summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2005-05-12 13:37:49 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2005-05-12 13:37:49 +0000
commit2d35bc7a2a39f0f41802344e1103d036fc7231a8 (patch)
tree2b5d70bab559b327879db52e3f78039087aef225 /src
parentb289065e65f96153a512808b53fd9e452029d0f5 (diff)
fl_draw() would segfault on WIN32 if no font was set; it now uses
the default font (STR #828) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4329 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/fl_font_win32.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fl_font_win32.cxx b/src/fl_font_win32.cxx
index aaab32a1e..13b361e83 100644
--- a/src/fl_font_win32.cxx
+++ b/src/fl_font_win32.cxx
@@ -155,7 +155,7 @@ double fl_width(uchar c) {
void fl_draw(const char* str, int n, int x, int y) {
COLORREF oldColor = SetTextColor(fl_gc, fl_RGB());
- SelectObject(fl_gc, fl_fontsize->fid);
+ if (fl_fontsize) SelectObject(fl_gc, fl_fontsize->fid);
TextOut(fl_gc, x, y, str, n);
SetTextColor(fl_gc, oldColor);
}