Skip to content

Commit

Permalink
fix crash on raspberry-pi when thumbnail not able to generate
Browse files Browse the repository at this point in the history
  • Loading branch information
kanishka-linux committed Oct 25, 2020
1 parent 0872870 commit 6b01f95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kawaii_player/kawaii_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -6810,11 +6810,11 @@ def thumbnail_generated(self, row=None, picn=None):
icon_new_pixel = self.create_new_image_pixel(picn, size)
if os.path.exists(icon_new_pixel):
try:
if row < self.list2.count():
if row < self.list2.count() and icon_new_pixel is not None:
self.list2.item(row).setIcon(QtGui.QIcon(icon_new_pixel))
if ((ui.view_mode == "thumbnail_light"
and ui.list_poster.title_clicked)
or ui.display_device == "rpitv"):
or (ui.display_device == "rpitv" and icon_new_pixel is not None)):
ui.list_poster.item(row).setIcon(QtGui.QIcon(icon_new_pixel))
except Exception as err:
logger.error(err)
Expand Down

0 comments on commit 6b01f95

Please sign in to comment.