From: Pierre d'Herbemont Date: Sun, 13 Jul 2008 15:10:31 +0000 (+0200) Subject: macosx: Make sure the o_info object gets released even if the nib has not been loaded. X-Git-Tag: 0.9.0-test2~22 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=4ad2f8dc6a89e4349ecfa1ad6f0c4285d86612d3;p=vlc macosx: Make sure the o_info object gets released even if the nib has not been loaded. --- diff --git a/modules/gui/macosx/intf.h b/modules/gui/macosx/intf.h index 3dbe618f44..718a83bdab 100644 --- a/modules/gui/macosx/intf.h +++ b/modules/gui/macosx/intf.h @@ -93,6 +93,7 @@ struct intf_sys_t * VLCMain interface *****************************************************************************/ @class AppleRemote; +@class VLCInformation; @interface VLCMain : NSObject { intf_thread_t *p_intf; /* The main intf object */ @@ -105,7 +106,7 @@ struct intf_sys_t id o_bookmarks; /* VLCBookmarks */ id o_embedded_list; /* VLCEmbeddedList*/ id o_interaction_list; /* VLCInteractionList*/ - id o_info; /* VLCInformation */ + VLCInformation * o_info; /* VLCInformation */ #ifdef UPDATE_CHECK id o_update; /* VLCUpdate */ #endif diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m index 43ff84bd00..459ca86c22 100644 --- a/modules/gui/macosx/intf.m +++ b/modules/gui/macosx/intf.m @@ -1751,9 +1751,9 @@ end: if( nib_bookmarks_loaded ) [o_bookmarks release]; - if( nib_info_loaded ) + if( o_info ) { - [o_info stop]; + [o_info stopTimers]; [o_info release]; } diff --git a/modules/gui/macosx/playlistinfo.h b/modules/gui/macosx/playlistinfo.h index 82cb58223b..7138107854 100644 --- a/modules/gui/macosx/playlistinfo.h +++ b/modules/gui/macosx/playlistinfo.h @@ -102,6 +102,8 @@ } - (void)initPanel; +- (void)stopTimers; + - (IBAction)metaFieldChanged:(id)sender; - (IBAction)saveMetaData:(id)sender; - (void)initMediaPanelStats; diff --git a/modules/gui/macosx/playlistinfo.m b/modules/gui/macosx/playlistinfo.m index c0dfa25714..858d55c159 100644 --- a/modules/gui/macosx/playlistinfo.m +++ b/modules/gui/macosx/playlistinfo.m @@ -119,7 +119,7 @@ static VLCInfo *_o_sharedInstance = nil; [self updatePanelWithItem:p_item]; } -- (void)stop +- (void)stopTimers { /* make sure that the timer is released in any case */ if( o_statUpdateTimer && [o_statUpdateTimer isValid] )