[vlc-commits] projectm: fix NULL or uninitialized pointer dereference
Rafaël Carré
git at videolan.org
Mon Mar 10 19:48:11 CET 2014
vlc | branch: master | Rafaël Carré <funman at videolan.org> | Mon Mar 10 19:44:17 2014 +0100| [9781b239ff58ca7cedbd2a17d8ce2d9fa3c0fe62] | committer: Rafaël Carré
projectm: fix NULL or uninitialized pointer dereference
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9781b239ff58ca7cedbd2a17d8ce2d9fa3c0fe62
---
modules/visualization/projectm.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules/visualization/projectm.cpp b/modules/visualization/projectm.cpp
index d2ad20e..d3fe4cd 100644
--- a/modules/visualization/projectm.cpp
+++ b/modules/visualization/projectm.cpp
@@ -293,7 +293,7 @@ static void *Thread( void *p_data )
filter_sys_t *p_sys = p_filter->p_sys;
video_format_t fmt;
- vlc_gl_t *gl;
+ vlc_gl_t *gl = NULL;
unsigned int i_last_width = 0;
unsigned int i_last_height = 0;
locale_t loc;
@@ -467,7 +467,8 @@ static void *Thread( void *p_data )
assert(0);
error:
- vlc_gl_ReleaseCurrent( gl );
+ if (gl)
+ vlc_gl_ReleaseCurrent( gl );
p_sys->b_error = true;
vlc_sem_post( &p_sys->ready );
return NULL;
More information about the vlc-commits
mailing list