From cd8909f90395c8f10d5cbb7d82c481a57f922c83 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Mon, 24 Apr 2017 19:58:07 +0000 Subject: Slight improvement of Fl_Image_Surface::image() git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12224 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Image_Surface.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Fl_Image_Surface.cxx b/src/Fl_Image_Surface.cxx index b8b50a2bc..53448fd29 100644 --- a/src/Fl_Image_Surface.cxx +++ b/src/Fl_Image_Surface.cxx @@ -78,8 +78,8 @@ int Fl_Image_Surface::printable_rect(int *w, int *h) {return platform_surface-> The caller is responsible for deleting the image. */ Fl_RGB_Image *Fl_Image_Surface::image() { - bool need_push = (Fl_Surface_Device::surface() != this); - if (need_push) Fl_Surface_Device::push_current(this); + bool need_push = (Fl_Surface_Device::surface() != platform_surface); + if (need_push) Fl_Surface_Device::push_current(platform_surface); Fl_RGB_Image *img = platform_surface->image(); if (need_push) Fl_Surface_Device::pop_current(); return img; -- cgit v1.2.3