summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-11-09 20:55:50 +0000
committerManolo Gouy <Manolo>2016-11-09 20:55:50 +0000
commita873e414bd184ee3d5985e2ddcda19acd9d75b74 (patch)
tree9f07c65247e7022c7c33858531d70f428518da1b
parentc530cdeda65fa1479b2a77c63b91e8a947cc32eb (diff)
Fix possible crash when turning fullscreen the scroll test program.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@12091 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--src/Fl_cocoa.mm1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index 318c33c06..9deee908f 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -4089,6 +4089,7 @@ static NSBitmapImageRep* rect_to_NSBitmapImageRep(Fl_Window *win, int x, int y,
NSEnumerator *enumerator = [children objectEnumerator];
id child;
while ((child = [enumerator nextObject]) != nil) {
+ if (![child isKindOfClass:[FLWindow class]]) continue;
Fl_Window *sub = [(FLWindow*)child getFl_Window];
CGRect rsub = CGRectMake(sub->x(), win->h() -(sub->y()+sub->h()), sub->w(), sub->h());
CGRect clip = CGRectMake(x, win->h()-(y+h), w, h);