XFT: Fixed SIGSEGV-crash in D'n'D when using XFT fonts jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Sun, 18 Dec 2016 21:57:26 +0000
branchjv
changeset 7766 ba07a358cb4a
parent 7765 b8189ae681df
child 7767 7ba26d21c628
XFT: Fixed SIGSEGV-crash in D'n'D when using XFT fonts caused by leftover code that destroyed drawable without letting an instance of a `Form` know. This subsequently lead to a crash (not surprisingly)
XftFontDescription.st
--- a/XftFontDescription.st	Sun Dec 18 12:12:59 2016 +0000
+++ b/XftFontDescription.st	Sun Dec 18 21:57:26 2016 +0000
@@ -464,11 +464,10 @@
      clipOrg clipCorn clipRect clipX clipY clipW clipH clipPnt
      fg fgR fgG fgB fgA fgPixel bg bgR bgG bgB bgA bgPixel
      drawX drawY drawPnt displayId screen drawableId error stringLen drawId drawIdIsShared
-     newXftDrawId newDrawableAssociation pixmapDepth|
+     newXftDrawId newDrawableAssociation |
 
-    aGC isPixmap ifTrue:[
-        pixmapDepth := aGC depth.
-        pixmapDepth == 1 ifTrue:[
+    aGC isPixmap ifTrue:[        
+        aGC depth ifTrue:[
             "/ Using XFT font to draw in bitmap is not allowed. In theory it could
             "/ work if XFT would just turn gray into either black or white. But XFT
             "/ doesn't do it and simply draw nothing without failing in any way. 
@@ -669,10 +668,6 @@
         goto err;
     }
 
-    if (pixmapDepth != nil) {
-        XftDrawDestroy(__sharedDrawId);
-    }
-
     RETURN(self);
 
 #endif