Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nHasDragDropPayload SIGSEGV when payload doesn't exist #155

Merged
merged 1 commit into from
Feb 3, 2023

Conversation

Moulberry
Copy link
Contributor

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

  • Minor changes or tweaks (quality of life stuff)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

`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
@SpaiR SpaiR added the fix Fixes problems label Feb 3, 2023
@SpaiR SpaiR merged commit 667d610 into SpaiR:main Feb 3, 2023
@SpaiR
Copy link
Owner

SpaiR commented Feb 3, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Fixes problems
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants