aboutsummaryrefslogtreecommitdiff
path: root/libXext/src
diff options
context:
space:
mode:
Diffstat (limited to 'libXext/src')
-rw-r--r--libXext/src/Xge.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libXext/src/Xge.c b/libXext/src/Xge.c
index 74e48020a..1f37e596d 100644
--- a/libXext/src/Xge.c
+++ b/libXext/src/Xge.c
@@ -218,7 +218,15 @@ _xgeDpyClose(Display* dpy, XExtCodes* codes)
XFree(xge_data);
}
- return XextRemoveDisplay(xge_info, dpy);
+ if(!XextRemoveDisplay(xge_info, dpy))
+ return 0;
+
+ if (xge_info->ndisplays == 0) {
+ XextDestroyExtension(xge_info);
+ xge_info = NULL;
+ }
+
+ return 1;
}
/*