Commit dfa0e1e9 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

update: Make sure we don't leak.

This fix also a crash because of a non joined thread on Mac OS X.
parent 884122a7
......@@ -672,6 +672,8 @@ static VLCMain *_o_sharedMainInstance = nil;
/* remove global observer watching for vout device changes correctly */
[[NSNotificationCenter defaultCenter] removeObserver: self];
[o_update end];
/* release some other objects here, because it isn't sure whether dealloc
* will be called later on */
......
......@@ -47,6 +47,8 @@
bool b_checked;
}
- (void)end;
- (IBAction)download:(id)sender;
- (IBAction)okay:(id)sender;
- (IBAction)changeCheckUpdateOnStartup:(id)sender;
......
......@@ -69,6 +69,11 @@ static VLCUpdate *_o_sharedInstance = nil;
return _o_sharedInstance;
}
- (void)end
{
if( p_u ) update_Delete( p_u );
}
- (void)awakeFromNib
{
/* we don't use - (BOOL)shouldCheckUpdateOnStartup because we don't want
......
......@@ -1074,6 +1074,7 @@ void update_Delete( update_t *p_update )
assert( !p_update->p_download );
vlc_object_kill( p_update->p_check );
vlc_thread_join( p_update->p_check );
vlc_object_release( p_update->p_check );
}
else if( p_update->p_download )
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment