XftFontDescription.st
branchjv
changeset 7772 a59648e60593
parent 7766 ba07a358cb4a
child 7855 46203abe7d57
--- a/XftFontDescription.st	Fri Jan 06 23:53:36 2017 +0000
+++ b/XftFontDescription.st	Mon Jan 09 21:14:42 2017 +0000
@@ -307,8 +307,9 @@
 xftDrawDestroy: xftDrawId
 %{
 #ifdef XFT
-    if (__isExternalAddressLike(xftDrawId)) {
-        XftDraw *xftDraw = XFT_DRAW(xftDrawId);        
+    XftDraw *xftDraw;
+    if (__isExternalAddressLike(xftDrawId) && (xftDraw = XFT_DRAW(xftDrawId)) != NULL) {
+        __externalAddressVal(xftDrawId) = NULL;             
         XftDrawDestroy(xftDraw);
     }
     RETURN (self);