Only destroy the listener in a frame window if it actually was initialised.
This commit is contained in:
parent
db4719bd1d
commit
8c47f68f66
1 changed files with 4 additions and 2 deletions
|
@ -38,8 +38,10 @@ static coord_t BorderSizeT(GHandle gh) { return (gh->flags & GWIN_FRAME_BORDER)
|
||||||
|
|
||||||
static void _frameDestroy(GHandle gh) {
|
static void _frameDestroy(GHandle gh) {
|
||||||
/* Deregister the button callback */
|
/* Deregister the button callback */
|
||||||
geventRegisterCallback(&gh2obj->gl, NULL, NULL);
|
if ((flags & (GWIN_FRAME_CLOSE_BTN|GWIN_FRAME_MINMAX_BTN))) {
|
||||||
geventDetachSource(&gh2obj->gl, NULL);
|
geventRegisterCallback(&gh2obj->gl, NULL, NULL);
|
||||||
|
geventDetachSource(&gh2obj->gl, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
/* call the gcontainer standard destroy routine */
|
/* call the gcontainer standard destroy routine */
|
||||||
_gcontainerDestroy(gh);
|
_gcontainerDestroy(gh);
|
||||||
|
|
Loading…
Add table
Reference in a new issue