Cocoa: Prevent crash on QWindow delete.
Clear the QCocoaWindow pointer stored on the QNSWindowHelper when detaching from the platform window. This makes sure callbacks from cocoa does not try access deleted Qt window objects. Task-number: QTBUG-39141 Change-Id: I4672eae92940dcbd59a2848e56f94b50a828bbf6 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This commit is contained in:
parent
8701c20f0d
commit
7ba0eb5a0d
@ -182,6 +182,7 @@ static bool isMouseEvent(NSEvent *ev)
|
|||||||
|
|
||||||
- (void)detachFromPlatformWindow
|
- (void)detachFromPlatformWindow
|
||||||
{
|
{
|
||||||
|
_platformWindow = 0;
|
||||||
[self.window.delegate release];
|
[self.window.delegate release];
|
||||||
self.window.delegate = nil;
|
self.window.delegate = nil;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user