summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl E. Thompson <devel-fltk@carlthompson.net>1999-07-21 01:21:49 +0000
committerCarl E. Thompson <devel-fltk@carlthompson.net>1999-07-21 01:21:49 +0000
commitae621ef7787392b1214a4a662a9f70e7c3a74794 (patch)
treebd63bbf8736311537806d5c1560ff1803dcb14fd /src
parent4da7a063008f187a66ab4d3de72a2d7cbf1d276a (diff)
Fixed core dump when drawing with a font but it hadn't been previous set.
Carl git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@625 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/fl_font.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fl_font.cxx b/src/fl_font.cxx
index 4d9776c00..670acc352 100644
--- a/src/fl_font.cxx
+++ b/src/fl_font.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_font.cxx,v 1.9 1999/01/07 19:17:39 mike Exp $"
+// "$Id: fl_font.cxx,v 1.9.2.1 1999/07/21 01:21:49 carl Exp $"
//
// Font selection code for the Fast Light Tool Kit (FLTK).
//
@@ -278,6 +278,7 @@ double fl_width(uchar c) {
}
void fl_draw(const char* str, int n, int x, int y) {
+ if (!fl_xfont) fl_font(0, 14); // Perhaps this should be configured somewhere?
if (font_gc != fl_gc) {
font_gc = fl_gc;
XSetFont(fl_display, fl_gc, fl_xfont->fid);
@@ -292,5 +293,5 @@ void fl_draw(const char* str, int x, int y) {
#endif
//
-// End of "$Id: fl_font.cxx,v 1.9 1999/01/07 19:17:39 mike Exp $".
+// End of "$Id: fl_font.cxx,v 1.9.2.1 1999/07/21 01:21:49 carl Exp $".
//