Skip to content

Commit

Permalink
Really fix SFML patch for OS X (last patch was invalid)
Browse files Browse the repository at this point in the history
  • Loading branch information
4ian committed Jan 3, 2017
1 parent 3d89bd5 commit dea86d7
Showing 1 changed file with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
From f55ee73a73398bb77ce9c63ff1a13d8053cb1d18 Mon Sep 17 00:00:00 2001
From: Florian Rival <[email protected]>
Date: Tue, 3 Jan 2017 21:15:11 +0100
Subject: [PATCH] Fix crash with SFML embeded in wxWidgets on OS X

---
src/SFML/Window/OSX/SFViewController.mm | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/src/SFML/Window/OSX/SFViewController.mm b/src/SFML/Window/OSX/SFViewController.mm
index 7d736e3..113cacd 100644
index 7d736e3..280ec2b 100644
--- a/src/SFML/Window/OSX/SFViewController.mm
+++ b/src/SFML/Window/OSX/SFViewController.mm
@@ -82,8 +82,11 @@ -(id)initWithView:(NSView *)view
@@ -82,8 +82,12 @@ -(id)initWithView:(NSView *)view
////////////////////////////////////////////////////////
-(void)dealloc
{
+ NSLog(@"SFViewController::dealloc called on %@", self);
[self closeWindow];


+
+ // See https://github.com/SFML/SFML/issues/824
+ [[NSNotificationCenter defaultCenter] removeObserver:m_oglView];
[m_view release];
[m_oglView release];

--
2.7.4 (Apple Git-66)

0 comments on commit dea86d7

Please sign in to comment.