From 5c560e82b36c8dc69942114f88afab9b326b705c Mon Sep 17 00:00:00 2001 From: Antoine Mercadal Date: Mon, 7 Nov 2011 15:05:34 +0100 Subject: [PATCH] ensure attached window is not nil when positioning or instanciate it --- AppKit/CPPopover.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppKit/CPPopover.j b/AppKit/CPPopover.j index 6d0f06cce..711a5ef26 100644 --- a/AppKit/CPPopover.j +++ b/AppKit/CPPopover.j @@ -213,7 +213,7 @@ var CPPopoverDelegate_popover_willShow_ = 1 << 0, if (!_contentViewController) [CPException raise:CPInternalInconsistencyException reason:@"contentViewController must not be nil"]; - if (_needsCompute) + if (_needsCompute || !_attachedWindow) { var styleMask = (_behavior == CPPopoverBehaviorTransient) ? CPClosableOnBlurWindowMask : nil; _attachedWindow = [[_CPAttachedWindow alloc] initWithContentRect:CPRectMakeZero() styleMask:styleMask];