From patchwork Mon May 28 11:06:31 2007 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schwarzott X-Patchwork-Id: 12467 Received: from mail-out.m-online.net ([212.18.0.10]) by www.linuxtv.org with esmtp (Exim 4.63) (envelope-from ) id 1Hsd3d-00066z-PN for vdr@linuxtv.org; Mon, 28 May 2007 13:06:37 +0200 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id 8CB5B24A9AA for ; Mon, 28 May 2007 11:06:30 +0000 (UTC) Received: from gauss.x.fun (DSL01.83.171.163.120.ip-pool.NEFkom.net [83.171.163.120]) by mail.nefkom.net (Postfix) with ESMTP id 5785891B0D for ; Mon, 28 May 2007 13:06:34 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by gauss.x.fun (Postfix) with ESMTP id D859B4A46 for ; Mon, 28 May 2007 13:06:33 +0200 (CEST) From: Matthias Schwarzott To: vdr@linuxtv.org Date: Mon, 28 May 2007 13:06:31 +0200 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Message-Id: <200705281306.32486.zzam@gentoo.org> Subject: [vdr] [PATCH] vdr-dvdswitch crashing when pressing an arrow key in empty image directory X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 May 2007 11:06:37 -0000 Status: O X-Status: X-Keywords: X-UID: 13028 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 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; }