Hide control before marking it destroyed, otherwise we may arrange an invalid object.

[GB.GTK]
* BUG: Hide control before marking it destroyed, otherwise we may arrange an invalid object.

[GB.GTK3]
* BUG: Hide control before marking it destroyed, otherwise we may arrange an invalid object.
This commit is contained in:
gambas 2021-03-20 16:44:22 +01:00
parent a879b7313c
commit ac60e5e43e

View file

@ -488,9 +488,8 @@ void gControl::destroy()
#if DEBUG_DESTROY
fprintf(stderr, "destroy: %p %s (%d)\n", this, name(), _destroyed);
#endif
_destroyed = true;
hide();
_destroyed = true;
dispose();
#if DEBUG_DESTROY