Browse Source

upnpx: prevent race conditional selector failure on dealloc

Felix Paul Kühne 11 years ago
parent
commit
cb7ed6683e
1 changed files with 16 additions and 0 deletions
  1. 16 0
      patches/upnpx/dealloc-selector-failure.patch

+ 16 - 0
patches/upnpx/dealloc-selector-failure.patch

@@ -0,0 +1,16 @@
+diff -ru upnpx-1.2.4/src/upnp/UPnPManager.m upnpx/src/upnp/UPnPManager.m
+--- upnpx-1.2.4/src/upnp/UPnPManager.m	2012-03-07 20:53:57.000000000 +0100
++++ upnpx/src/upnp/UPnPManager.m	2013-09-08 18:28:07.000000000 +0200
+@@ -74,8 +74,10 @@
+ }
+ 
+ -(void)dealloc{
+-    [upnpEvents stop];
+-	[SSDP stopSSDP];
++    if (upnpEvents)
++        [upnpEvents stop];
++    if (SSDP)
++        [SSDP stopSSDP];
+ 	[SSDP release];
+ 	[DB release];
+ 	[serviceFactory release];