Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > b2d2ff38aa20f26a3dd3e979ce60c8b5 > files > 1

vdr-plugin-dvdswitch-0.2.0-5.mga3.src.rpm

#!/bin/sh /usr/share/dpatch/dpatch-run

## 03_no-files-crash.dpatch by Matthias Schwarzott <zzam@gentoo.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fixes this Bug: Opening DVDSwitch menu if the image directory is empty,
## DP: and then pressing some arrow key crashes vdr.

@DPATCH@
Index: dvdswitch-0.1.3/menu.c
===================================================================
--- dvdswitch-0.1.3.orig/menu.c
+++ dvdswitch-0.1.3/menu.c
@@ -754,8 +754,10 @@ eOSState cMainMenu::MenuMove(eKeys Key)
   SetHelp();
 
   mItem = (cMainMenuItem*)Get(Current());
-  MainMenuOptions.setLastSelectItemName(mItem->FileName());
-  MainMenuOptions.LastSelectItemType(mItem->Type());
+  if (mItem) {
+    MainMenuOptions.setLastSelectItemName(mItem->FileName());
+    MainMenuOptions.LastSelectItemType(mItem->Type());
+  }
 
   return state;
 }