diff -r 78ad99c24f08 -r 420f6808bf21 photosgallery/viewframework/commandhandlers/commandhandlerbase/src/glxmpxcommandcommandhandler.cpp --- a/photosgallery/viewframework/commandhandlers/commandhandlerbase/src/glxmpxcommandcommandhandler.cpp Tue May 25 12:42:31 2010 +0300 +++ b/photosgallery/viewframework/commandhandlers/commandhandlerbase/src/glxmpxcommandcommandhandler.cpp Wed Jun 09 09:41:51 2010 +0300 @@ -94,9 +94,9 @@ // Check if the selected / focused file(s)s have been deleted from // another application while the confirmation note is displayed - if (((selectionCount > 0) && (aList.SelectionCount() == 0)) || - ((selectionCount == 0) && - (focusedMedia.Id() != aList.Item(aList.FocusIndex()).Id()))) + if (((selectionCount > 0) && (aList.SelectionCount() == 0)) + || ((selectionCount == 0) && aList.Count() && (focusedMedia.Id() + != aList.Item(aList.FocusIndex()).Id()))) { // All the selected / focused item(s) have been deleted, // do not allow the command to execute.