dont try use an icon when where isnt one
authorDana Jansens <danakj@orodu.net>
Tue, 27 May 2003 03:39:00 +0000 (03:39 +0000)
committerDana Jansens <danakj@orodu.net>
Tue, 27 May 2003 03:39:00 +0000 (03:39 +0000)
openbox/popup.c

index 07331e5edb5b5ebe1a6f50d2b9e93082258841f3..22b1c230b6651b7551ef1cb0d1b7ed95e2857924 100644 (file)
@@ -173,8 +173,11 @@ void popup_show(Popup *self, char *text, Icon *icon)
                      textw, texth);
 
     if (self->hasicon) {
-        RrTextureSetRGBA(self->s_icon, 0, icon->data, 0, 0, icon->width,
-                         icon->height);
+        if (icon)
+            RrTextureSetRGBA(self->s_icon, 0, icon->data, 0, 0, icon->width,
+                             icon->height);
+        else
+            RrTextureSetNone(self->s_icon, 0);
         if (iconw < 1) iconw = 1; /* sanity check for crashes */
         RrSurfaceSetArea(self->s_icon,
                          theme_bwidth + theme_bevel,