changeset 36297:6fc430e33c76

Fix segmentation fault with aspect ratio menu entry. Without video stream guiInfo.sh_video isn't set. Reported by Hans-Dieter Kosch, hdkosch kabelbw de.
author ib
date Fri, 02 Aug 2013 09:39:28 +0000
parents 1b84e470698c
children 353055b6213d
files gui/dialog/menu.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gui/dialog/menu.c	Thu Aug 01 21:20:14 2013 +0000
+++ b/gui/dialog/menu.c	Fri Aug 02 09:39:28 2013 +0000
@@ -584,7 +584,7 @@
    {
     int a11 = False, a169 = False, a43 = False, a235 = False;
 
-    if (FFABS(guiInfo.sh_video->aspect - guiInfo.sh_video->original_aspect) <= 0.01f) a11 = True;
+    if (!guiInfo.sh_video || (FFABS(guiInfo.sh_video->aspect - guiInfo.sh_video->original_aspect) <= 0.01f)) a11 = True;
     else
      {
        a169 = (FFABS(movie_aspect - 16.0f / 9.0f) <= 0.01f);