SpaiR / imgui-java

JNI based binding for Dear ImGui
MIT License
551 stars 90 forks source link

Fix nHasDragDropPayload SIGSEGV when payload doesn't exist #155

Closed Moulberry closed 1 year ago

Moulberry commented 1 year ago

Description

getDragDropPayload() functions should simply return null when the payload doesn't exist.

Currently, DearImGui will return NULL from ImGui::GetDragDropPayload() when the payload does not exist. This causes a null dereference since the nHasDragDropPayload function performs no NULL check

Type of change

SpaiR commented 1 year ago

A very descent PR description! Thanks for the contribution 👍 I'll make a release on the weekend.