Module: wine
Branch: master
Commit: ebcf8aadc54a12aa9359da109ea89608e417210c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ebcf8aadc54a12aa9359da109…
Author: Ken Thomases <ken(a)codeweavers.com>
Date: Mon Nov 30 14:34:59 2015 -0600
winemac: Remove a window from the NSWorkspace notification center when it's deallocated.
It was added as an observer in commit 3beec95a0. Failing to remove it caused
the notification center to have a dangling pointer and caused crashes and hangs.
Signed-off-by: Ken Thomases <ken(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/winemac.drv/cocoa_window.m | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m
index 75f5605..bcc1cf5 100644
--- a/dlls/winemac.drv/cocoa_window.m
+++ b/dlls/winemac.drv/cocoa_window.m
@@ -777,6 +777,7 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi
- (void) dealloc
{
+ [[[NSWorkspace sharedWorkspace] notificationCenter] removeObserver:self];
[[NSNotificationCenter defaultCenter] removeObserver:self];
[queue release];
[latentChildWindows release];