From kde-commits Thu May 31 23:10:02 2012 From: Harald Sitter Date: Thu, 31 May 2012 23:10:02 +0000 To: kde-commits Subject: [dragon] src/app: don't show remove context menu when no entry is highlighted Message-Id: <20120531231002.9B8FDA60A9 () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=133850621612892 Git commit 6de06f8a94618dd4dad8798f3bd580b1ab8adb53 by Harald Sitter. Committed on 01/06/2012 at 01:09. Pushed by sitter into branch 'master'. don't show remove context menu when no entry is highlighted BUG: 267607 M +2 -0 src/app/recentlyPlayedList.cpp http://commits.kde.org/dragon/6de06f8a94618dd4dad8798f3bd580b1ab8adb53 diff --git a/src/app/recentlyPlayedList.cpp b/src/app/recentlyPlayedList.cpp index 58ac55a..9de8d6e 100644 --- a/src/app/recentlyPlayedList.cpp +++ b/src/app/recentlyPlayedList.cpp @@ -74,6 +74,8 @@ RecentlyPlayedList::loadEntries() void RecentlyPlayedList::contextMenuEvent(QContextMenuEvent * event ) { + if (!currentItem()) + return; KMenu menu; kDebug() << "Loading Menu"; menu.addAction(KIcon(QLatin1String( "list-remove" )),i18n("Remove Entry"= ),this,SLOT(removeEntry()));