Skip to content

Commit

Permalink
fl_draw() would segfault on WIN32 if no font was set; it now uses
Browse files Browse the repository at this point in the history
the default font (STR #828)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4329 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
michaelrsweet committed May 12, 2005
1 parent b289065 commit 2d35bc7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/fl_font_win32.cxx
Expand Up @@ -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);
}
Expand Down

0 comments on commit 2d35bc7

Please sign in to comment.