summaryrefslogtreecommitdiff
path: root/src/Fl_Image_Surface.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2015-09-24 08:04:07 +0000
committerManolo Gouy <Manolo>2015-09-24 08:04:07 +0000
commit430636e91d05ead17e9b17af4226f3e26d48e2e0 (patch)
treeead0bd27b81cbf0fc9c261e2ce1e55036706b52b /src/Fl_Image_Surface.cxx
parentfe6117554647a4f54fb151a97d825fc408d653f5 (diff)
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
Diffstat (limited to 'src/Fl_Image_Surface.cxx')
-rw-r--r--src/Fl_Image_Surface.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Fl_Image_Surface.cxx b/src/Fl_Image_Surface.cxx
index 923431123..347ce3a2a 100644
--- a/src/Fl_Image_Surface.cxx
+++ b/src/Fl_Image_Surface.cxx
@@ -31,7 +31,7 @@ Fl_Image_Surface::Fl_Image_Surface(int w, int h) : Fl_Surface_Device(NULL) {
height = h;
#if !(defined(__APPLE__) || defined(WIN32))
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();
gc = XCreateGC(fl_display, RootWindow(fl_display, fl_screen), 0, 0);
fl_gc = gc;