diff options
author | nyamatongwe <devnull@localhost> | 2004-09-17 22:07:32 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2004-09-17 22:07:32 +0000 |
commit | 86004eb88381b5f7fcc412e61cc433d3436b9344 (patch) | |
tree | 226362c538fd68001afd0fef3a73bd1d27a72afc | |
parent | 2e9f60000f81a3bbb4d3f08bb8503393fb8f4d29 (diff) | |
download | scintilla-mirror-86004eb88381b5f7fcc412e61cc433d3436b9344.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 |