[vlc-commits] android_window: fix segfault if PictureAlloc fails

Thomas Guillem git at videolan.org
Fri Apr 10 12:24:34 CEST 2015


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Apr 10 09:27:43 2015 +0200| [a83f5d13fa030dad06440f843b1fea0296120e4e] | committer: Thomas Guillem

android_window: fix segfault if PictureAlloc fails

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a83f5d13fa030dad06440f843b1fea0296120e4e
---

 modules/video_output/android/android_window.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/video_output/android/android_window.c b/modules/video_output/android/android_window.c
index f17bb0d..406058f 100644
--- a/modules/video_output/android/android_window.c
+++ b/modules/video_output/android/android_window.c
@@ -996,7 +996,7 @@ static void Prepare(vout_display_t *vd, picture_t *picture,
 
         if (!sys->p_sub_pic && SetupWindowSubtitleSurface(sys) == 0)
             sys->p_sub_pic = PictureAlloc(sys, &sys->p_sub_window->fmt);
-        if (!sys->p_spu_blend)
+        if (!sys->p_spu_blend && sys->p_sub_pic)
             sys->p_spu_blend = filter_NewBlend(VLC_OBJECT(vd),
                                                &sys->p_sub_pic->format);
 



More information about the vlc-commits mailing list