If the targetView of attachedWindow has no more window, close the popover instead of trying to reposition it

This commit is contained in:
Antoine Mercadal committed 2013-01-23 10:45:09 -08:00
1 parent 4acd11d649
commit 348d689243
1 file changed
+6
+6
View File
@@ -189,6 +189,12 @@ var _CPAttachedWindow_attachedWindowShouldClose_ = 1 << 0,
// TODO: don't recompute everything, just compute the move offset
var edge = [_windowView preferredEdge];
if (![_targetView window])
{
[self _close]
return;
}
[self positionRelativeToRect:nil ofView:_targetView preferredEdge:edge];
}
}