[PATCH] vdr-dvdswitch crashing when pressing an arrow key in empty image directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there!

Opening DVDSwitch menu if the image directory is empty, and then pressing some 
arrow key crashes vdr.
The attached patch solves this bug.

Matthias

-- 
Matthias Schwarzott (zzam)
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;
 }
_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux