diff options
| author | Manolo Gouy <Manolo> | 2018-11-08 17:48:18 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2018-11-08 17:48:18 +0000 |
| commit | b325a6b4b20e250a6907e520a70a9ab2d772adf9 (patch) | |
| tree | adfcca5e20bf8ec29ea40ccb1a6d72059e1c308c /src/gl_draw.cxx | |
| parent | ff20361f5ab219f5ab2b5204addf548b82c58105 (diff) | |
Add guard against gl_draw(const char*, int) called with null 2nd argument.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13117 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/gl_draw.cxx')
| -rw-r--r-- | src/gl_draw.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gl_draw.cxx b/src/gl_draw.cxx index 6af0deb8e..695c4ee08 100644 --- a/src/gl_draw.cxx +++ b/src/gl_draw.cxx @@ -128,8 +128,10 @@ void gl_remove_displaylist_fonts() \see gl_texture_pile_height(int) */ void gl_draw(const char* str, int n) { - if (has_texture_rectangle) Fl_Gl_Window_Driver::draw_string_with_texture(str, n); - else Fl_Gl_Window_Driver::global()->draw_string_legacy(str, n); + if (n > 0) { + if (has_texture_rectangle) Fl_Gl_Window_Driver::draw_string_with_texture(str, n); + else Fl_Gl_Window_Driver::global()->draw_string_legacy(str, n); + } } |
