diff --git a/src/frame.c b/src/frame.c
index 02eed147a1ed686f75c532acbf98abb054da4064..b1ffe8893b4c3ef301e426363b8ae7890185a631 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -170,6 +170,15 @@ static void frameCreateTitlePixmap(Client * c, int state, int left, int right, M
     }
 
     width = frameWidth(c) - corners[CORNER_TOP_LEFT][ACTIVE].width - corners[CORNER_TOP_RIGHT][ACTIVE].width;
+    if (width < 1)
+    {
+        pm->pixmap = None;
+	pm->mask = None;
+	pm->width = 0;
+	pm->height = 0;
+        return;
+    }
+    
     if(left < corners[CORNER_TOP_LEFT][ACTIVE].width)
     {
         left = corners[CORNER_TOP_LEFT][ACTIVE].width;
@@ -251,7 +260,7 @@ static void frameCreateTitlePixmap(Client * c, int state, int left, int right, M
     gc = gdk_gc_new(gpixmap);
     gdk_gc_get_values(title_colors[state].gc, &values);
     gdk_gc_set_values(gc, &values, GDK_GC_FOREGROUND);
-
+    
     if(w1 > 0)
     {
         fillRectangle(dpy, pm->pixmap, title[TITLE_1][state].pixmap, 0, 0, w1, frameTop(c));
diff --git a/src/pixmap.c b/src/pixmap.c
index bd64559b793c3ae5dead763af90d170c5d3e84e3..4a44708ccc571199d20cff57454765ac6953384f 100644
--- a/src/pixmap.c
+++ b/src/pixmap.c
@@ -65,8 +65,10 @@ gboolean loadPixmap(Display * dpy, MyPixmap * pm, gchar * dir, gchar * file, Xpm
 
 void createPixmap(Display * dpy, MyPixmap * pm, gint width, gint height)
 {
+    DBG("entering createPixmap, width=%i, height=%i\n", width, height);
     if ((width < 1) || (height < 1))
     {
+        DBG("Pixmap size invalid\n");
 	pm->pixmap = None;
 	pm->mask = None;
         pm->width = 0;