Fix gl_draw() in normal window under WIN32.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11720 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2016-05-08 16:43:59 +00:00
parent 8813f93ac1
commit 188f80161a

View File

@ -134,8 +134,8 @@ Fl_Gl_Choice *Fl_WinAPI_Gl_Window_Driver::find(int m, const int *alistp)
if (g) return g;
// Replacement for ChoosePixelFormat() that finds one with an overlay
// if possible:
HDC gc = (HDC)fl_graphics_driver->gc();
// if possible:)
HDC gc = (HDC)(fl_graphics_driver ? fl_graphics_driver->gc() : 0);
if (!gc) gc = fl_GetDC(0);
int pixelformat = 0;
PIXELFORMATDESCRIPTOR chosen_pfd;