diff options
| author | Manolo Gouy <Manolo> | 2014-01-22 20:39:21 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2014-01-22 20:39:21 +0000 |
| commit | 4eee9f1f63fa81e64c15e0659231475a0c2d6ce7 (patch) | |
| tree | a6bcc7a947f75c03e6e5b28e7db89a19f66f9078 /src/fl_read_image_mac.cxx | |
| parent | 4d5e10097e3561c8d83698da03713a489bf254ff (diff) | |
Mac OS: handle possible NULL return after screen capture attempt.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10078 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_read_image_mac.cxx')
| -rw-r--r-- | src/fl_read_image_mac.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/fl_read_image_mac.cxx b/src/fl_read_image_mac.cxx index 5dbd70781..a92684d1a 100644 --- a/src/fl_read_image_mac.cxx +++ b/src/fl_read_image_mac.cxx @@ -45,6 +45,7 @@ fl_read_image(uchar *p, // I - Pixel buffer or NULL to allocate 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); + if (!base) return NULL; rowBytes = delta*w; x = y = 0; } |
