Drag and Drop: Allow NULL payload (since type only can be useful). (#143)

This commit is contained in:
omar 2017-11-09 20:09:09 +01:00
parent b6504b8eee
commit b1653cd361

View File

@ -10742,7 +10742,7 @@ bool ImGui::SetDragDropPayload(const char* type, const void* data, size_t data_s
IM_ASSERT(type != NULL);
IM_ASSERT(strlen(type) < IM_ARRAYSIZE(payload.DataType)); // Payload type can be at most 8 characters longs
IM_ASSERT(data != NULL && data_size > 0);
IM_ASSERT((data != NULL && data_size > 0) || (data == NULL && data_size == 0));
IM_ASSERT(cond == ImGuiCond_Always || cond == ImGuiCond_Once);
IM_ASSERT(payload.SourceId != 0); // Not called between BeginDragDropSource() and EndDragDropSource()