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
This commit is contained in:
parent
ff20361f5a
commit
b325a6b4b2
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user