diff options
author | nyamatongwe <unknown> | 2004-09-17 22:07:32 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2004-09-17 22:07:32 +0000 |
commit | d6fb2b9fb83826e29d0ef4af9abd0a26e64247cd (patch) | |
tree | 226362c538fd68001afd0fef3a73bd1d27a72afc | |
parent | 9f6be89c18414c9282d7adf8a1fae9a21cde8b82 (diff) | |
download | scintilla-mirror-d6fb2b9fb83826e29d0ef4af9abd0a26e64247cd.tar.gz |
Patch from Artem Baguinski to protect against ascent of 0.
-rw-r--r-- | gtk/PlatGTK.cxx | 5 |
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 |