Fix error when doubleclicking on empty groups

This commit is contained in:
Arjan Schrijver 2013-03-07 11:23:47 +01:00
parent 68d034e877
commit 66a41ee8ba
1 changed files with 3 additions and 0 deletions

View File

@ -451,6 +451,9 @@ class ImageMediaItem(MediaManagerItem):
if isinstance(bitem.child(index).data(0, QtCore.Qt.UserRole), ImageFilenames):
items.append(bitem.child(index))
items.remove(bitem)
# Don't try to display empty groups
if not items:
return False
# Find missing files
for bitem in items:
filename = bitem.data(0, QtCore.Qt.UserRole).filename