mirror of
https://github.com/fltk/fltk.git
synced 2026-06-02 15:46:52 +08:00
X11: fix crash when creating an Fl_Image_Surface object before fl_open_display() but after Fl::visual().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10866 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -31,7 +31,7 @@ Fl_Image_Surface::Fl_Image_Surface(int w, int h) : Fl_Surface_Device(NULL) {
|
|||||||
height = h;
|
height = h;
|
||||||
#if !(defined(__APPLE__) || defined(WIN32))
|
#if !(defined(__APPLE__) || defined(WIN32))
|
||||||
gc = 0;
|
gc = 0;
|
||||||
if (!fl_display) { // allows use of this class before any window is shown
|
if (!fl_gc) { // allows use of this class before any window is shown
|
||||||
fl_open_display();
|
fl_open_display();
|
||||||
gc = XCreateGC(fl_display, RootWindow(fl_display, fl_screen), 0, 0);
|
gc = XCreateGC(fl_display, RootWindow(fl_display, fl_screen), 0, 0);
|
||||||
fl_gc = gc;
|
fl_gc = gc;
|
||||||
|
|||||||
Reference in New Issue
Block a user