summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/FbTk/XFontImp.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/FbTk/XFontImp.cc b/src/FbTk/XFontImp.cc
index 0a1ea7d..195730d 100644
--- a/src/FbTk/XFontImp.cc
+++ b/src/FbTk/XFontImp.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: XFontImp.cc,v 1.7 2004/06/07 11:46:05 rathnor Exp $ 22// $Id: XFontImp.cc,v 1.8 2004/08/10 11:58:22 fluxgen Exp $
23 23
24#include "XFontImp.hh" 24#include "XFontImp.hh"
25#include "App.hh" 25#include "App.hh"
@@ -90,10 +90,9 @@ void XFontImp::drawText(Drawable w, int screen, GC gc, const char *text, size_t
90} 90}
91 91
92unsigned int XFontImp::textWidth(const char * const text, unsigned int size) const { 92unsigned int XFontImp::textWidth(const char * const text, unsigned int size) const {
93 if (text == 0) 93 if (text == 0 || m_fontstruct == 0)
94 return 0;
95 if (m_fontstruct == 0)
96 return 0; 94 return 0;
95
97 // check rotated font? 96 // check rotated font?
98 if (m_rotfont != 0) 97 if (m_rotfont != 0)
99 return rotTextWidth(text, size); 98 return rotTextWidth(text, size);