diff --git a/src/Fl_Widget.cxx b/src/Fl_Widget.cxx index 74287640b..5b4cadb19 100644 --- a/src/Fl_Widget.cxx +++ b/src/Fl_Widget.cxx @@ -141,10 +141,9 @@ Fl_Widget::Fl_Widget(int X, int Y, int W, int H, const char* L) { parent_ = 0; if (Fl_Group::current()) Fl_Group::current()->add(this); - static int been_here = 0; - if (!been_here) { - been_here = 1; - Fl_Display_Device::display_device(); // make sure fl_graphics_driver is initialized + if (!fl_graphics_driver) { + // Make sure fl_graphics_driver is initialized. Important if we are called by a static initializer. + Fl_Display_Device::display_device(); } }