From d6fb2b9fb83826e29d0ef4af9abd0a26e64247cd Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 17 Sep 2004 22:07:32 +0000 Subject: Patch from Artem Baguinski to protect against ascent of 0. --- gtk/PlatGTK.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gtk') 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 -- cgit v1.2.3