summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fl_read_image_mac.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/fl_read_image_mac.cxx b/src/fl_read_image_mac.cxx
index a92684d1a..a6324e5c1 100644
--- a/src/fl_read_image_mac.cxx
+++ b/src/fl_read_image_mac.cxx
@@ -42,9 +42,7 @@ fl_read_image(uchar *p, // I - Pixel buffer or NULL to allocate
if( (sw - x < w) || (sh - y < h) ) return NULL;
}
else { // reading from current window
- Fl_Window *window = Fl_Window::current();
- while(window->window()) window = window->window();
- base = Fl_X::bitmap_from_window_rect(window,x,y,w,h,&delta);
+ base = Fl_X::bitmap_from_window_rect(Fl_Window::current(),x,y,w,h,&delta);
if (!base) return NULL;
rowBytes = delta*w;
x = y = 0;