[API] Fix getDragDropPayloadObject
Methods was throwing nullpointer exception when there were no payload
This commit is contained in:
1 parent
1fe8c4a75a
commit
9e807d3e9e
1 file changed
+1
-1
@@ -4979,7 +4979,7 @@ public class ImGui {
|
||||
* Use in combination with {@link #setDragDropPayloadObject(String, Object)}.
|
||||
*/
|
||||
public static Object getDragDropPayloadObject() {
|
||||
return nGetDragDropPayloadObjectObject() ? objectPayloadRef.get() : null;
|
||||
return objectPayloadRef != null && nGetDragDropPayloadObjectObject() ? objectPayloadRef.get() : null;
|
||||
}
|
||||
|
||||
private static native boolean nGetDragDropPayloadObjectObject(); /*
|
||||
|
||||
Reference in new issue
Block a user