From 188f80161a5e3cc926c2ddfc6efccb3f4dbbb63c Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Sun, 8 May 2016 16:43:59 +0000 Subject: [PATCH] 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 --- src/Fl_Gl_Choice.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Fl_Gl_Choice.cxx b/src/Fl_Gl_Choice.cxx index 5eb55cac5..299bf3b2f 100644 --- a/src/Fl_Gl_Choice.cxx +++ b/src/Fl_Gl_Choice.cxx @@ -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;