diff options
| -rw-r--r-- | CHANGES | 2 | ||||
| -rw-r--r-- | src/fl_font_win32.cxx | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -2,6 +2,8 @@ CHANGES IN FLTK 1.1.7 - Documentation fixes (STR #648, STR #692, STR #730, STR #744, STR #745) + - fl_draw() would segfault on WIN32 if no font was set; + it now uses the default font (STR #828) - Fl_Browser_ was calling the callback multiple times for a single selection change with FL_WHEN_CHANGED (STR #834) 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); } |
