mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-15 19:52:05 +00:00
Fixed possible dead-pointers deleting a widget.
This commit is contained in:
parent
da072b79e9
commit
ebf8515a30
@ -908,11 +908,12 @@ void jmanager_free_capture()
|
||||
|
||||
void jmanager_free_widget(JWidget widget)
|
||||
{
|
||||
/* break any relationship with the GUI manager */
|
||||
if (widget->hasCapture())
|
||||
// Break any relationship with the GUI manager
|
||||
|
||||
if (widget->hasCapture() || (widget == capture_widget))
|
||||
jmanager_free_capture();
|
||||
|
||||
if (widget->hasMouse())
|
||||
if (widget->hasMouse() || (widget == mouse_widget))
|
||||
jmanager_free_mouse();
|
||||
|
||||
if (widget->hasFocus() || (widget == focus_widget))
|
||||
|
Loading…
Reference in New Issue
Block a user