Permalink
Browse files

Really fix SFML patch for OS X (last patch was invalid)

  • Loading branch information...
1 parent 3d89bd5 commit dea86d7c3357f7f670581aa182e9b56ed81106ee @4ian committed Jan 3, 2017
Showing with 17 additions and 3 deletions.
  1. +17 −3 ExtLibs/SFML-patches/02_workaround_OSX_crash_SFViewController.patch
@@ -1,15 +1,29 @@
+From f55ee73a73398bb77ce9c63ff1a13d8053cb1d18 Mon Sep 17 00:00:00 2001
+From: Florian Rival <Florian.Rival@gmail.com>
+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.