aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gtk/PlatGTK.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx
index daf0f790d..d6a282476 100644
--- a/gtk/PlatGTK.cxx
+++ b/gtk/PlatGTK.cxx
@@ -1484,9 +1484,12 @@ int SurfaceImpl::Ascent(Font &font_) {
ascent = PFont(font_)->ascent;
}
#endif
- if (ascent == 0) {
+ if ((ascent == 0) && (PFont(font_)->pfont)) {
ascent = PFont(font_)->pfont->ascent;
}
+ if (ascent == 0) {
+ ascent = 1;
+ }
FontMutexUnlock();
return ascent;
#else