[vlc-devel] commit: macosx: cleanup (Jean-Paul Saman )
Pierre d'Herbemont
pdherbemont at free.fr
Mon Mar 16 17:03:17 CET 2009
2009/3/16 git version control <git at videolan.org>:
> vlc | branch: master | Jean-Paul Saman <jpsaman at videolan.org> | Tue Mar 10 10:51:36 2009 +0100| [98c893ec7f44e8962a6bfd3e41cc8be6c41ec468] | committer: Jean-Paul Saman
>
> macosx: cleanup
>
>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=98c893ec7f44e8962a6bfd3e41cc8be6c41ec468
> ---
>
> modules/gui/macosx/intf.m | 26 +++++++++++++++-----------
> modules/gui/macosx/playlistinfo.m | 11 ++++++-----
> 2 files changed, 21 insertions(+), 16 deletions(-)
>
> diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
> index 8547121..318b94f 100644
> --- a/modules/gui/macosx/intf.m
> +++ b/modules/gui/macosx/intf.m
> @@ -79,9 +79,7 @@ int OpenIntf ( vlc_object_t *p_this )
>
> p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
> if( p_intf->p_sys == NULL )
> - {
> - return( 1 );
> - }
> + return VLC_ENOMEM;
>
> memset( p_intf->p_sys, 0, sizeof( *p_intf->p_sys ) );
>
> @@ -92,7 +90,7 @@ int OpenIntf ( vlc_object_t *p_this )
> p_intf->pf_run = Run;
> p_intf->b_should_run_on_first_thread = true;
>
> - return( 0 );
> + return VLC_SUCCESS;
> }
>
> /*****************************************************************************
> @@ -184,10 +182,13 @@ static int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable,
> vlc_value_t old_val, vlc_value_t new_val, void *param )
> {
> intf_thread_t * p_intf = VLCIntf;
> - p_intf->p_sys->b_intf_update = true;
> - p_intf->p_sys->b_playlist_update = true;
> - p_intf->p_sys->b_playmode_update = true;
> - p_intf->p_sys->b_current_title_update = true;
> + if( p_intf && p_intf->p_sys )
> + {
> + p_intf->p_sys->b_intf_update = true;
> + p_intf->p_sys->b_playlist_update = true;
> + p_intf->p_sys->b_playmode_update = true;
> + p_intf->p_sys->b_current_title_update = true;
> + }
This should not be needed. Or else we are in a very bad situation. I
would prefer a crash or an assert then :) What's the rationale behind
this?
Pierre.
More information about the vlc-devel
mailing list