[API] Fix getDragDropPayloadObject

Methods was throwing nullpointer  exception when there were no payload
This commit is contained in:
SpaiR committed 2021-02-27 16:16:55 +02:00
1 parent 1fe8c4a75a
commit 9e807d3e9e
1 file changed
+1 -1
+1 -1
View File
@@ -4979,7 +4979,7 @@ public class ImGui {
* Use in combination with {@link #setDragDropPayloadObject(String, Object)}. * Use in combination with {@link #setDragDropPayloadObject(String, Object)}.
*/ */
public static Object getDragDropPayloadObject() { public static Object getDragDropPayloadObject() {
return nGetDragDropPayloadObjectObject() ? objectPayloadRef.get() : null; return objectPayloadRef != null && nGetDragDropPayloadObjectObject() ? objectPayloadRef.get() : null;
} }
private static native boolean nGetDragDropPayloadObjectObject(); /* private static native boolean nGetDragDropPayloadObjectObject(); /*