Skip to content

Commit 82052af

Browse files
committed
Avoid empty menu bar on Xaw with cairo
* lwlib/lwlib-utils.c (crxft_font_open_name) [USE_CAIRO]: Return NULL if font extents are bogus.
1 parent e4f12a1 commit 82052af

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lwlib/lwlib-utils.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,11 @@ crxft_font_open_name (Display *dpy, int screen, const char *name)
192192
}
193193
FcPatternDestroy (pattern);
194194
}
195+
if (pub && pub->height <= 0)
196+
{
197+
crxft_font_close (pub);
198+
pub = NULL;
199+
}
195200
return pub;
196201
}
197202

0 commit comments

Comments
 (0)