Ticket #5930: mythgallery.diff
File mythgallery.diff, 1.1 KB (added by , 15 years ago) |
---|
-
mythplugins/mythgallery/mythgallery/iconview.cpp
881 881 { 882 882 ThumbItem *thumbitem = GetCurrentThumb(); 883 883 884 if (!thumbitem) 885 return; 886 884 887 QString title = tr("Delete Current File or Folder"); 885 888 QString msg = (thumbitem->IsDir()) ? 886 889 tr("Deleting 1 folder, including any subfolders and files.") : … … 894 897 if (doDelete) 895 898 { 896 899 ThumbItem *thumbitem = GetCurrentThumb(); 900 901 if (!thumbitem) 902 return; 903 897 904 QFileInfo fi; 898 905 fi.setFile(thumbitem->GetPath()); 899 906 GalleryUtil::Delete(fi); … … 1316 1323 ThumbItem *IconView::GetCurrentThumb(void) 1317 1324 { 1318 1325 MythUIButtonListItem *item = m_imageList->GetItemCurrent(); 1319 return qVariantValue<ThumbItem *>(item->GetData()); 1326 if (item) 1327 return qVariantValue<ThumbItem *>(item->GetData()); 1328 return NULL; 1320 1329 }