[vlc-devel] commit: Fixed a potential race condition in interaction. (Laurent Aimar )
git version control
git at videolan.org
Mon Aug 18 19:39:23 CEST 2008
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon Aug 18 13:08:25 2008 +0200| [ad14bac870b421457a3fbe7b0a716b72a1b27006] | committer: Laurent Aimar
Fixed a potential race condition in interaction.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ad14bac870b421457a3fbe7b0a716b72a1b27006
---
src/interface/interaction.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/interface/interaction.c b/src/interface/interaction.c
index f58d757..eaca6d8 100644
--- a/src/interface/interaction.c
+++ b/src/interface/interaction.c
@@ -470,9 +470,14 @@ static int DialogSend( vlc_object_t *p_this, interaction_dialog_t *p_dialog )
{
interaction_t *p_interaction = InteractionGet( p_this );
+ if( !p_interaction )
+ return VLC_EGENERIC;
+
/* Get an id, if we don't already have one */
+ vlc_object_lock( p_interaction );
if( p_dialog->i_id == 0 )
p_dialog->i_id = ++p_interaction->i_last_id;
+ vlc_object_unlock( p_interaction );
if( p_this->i_flags & OBJECT_FLAGS_NOINTERACT )
{
More information about the vlc-devel
mailing list