From 96e30dd989453b6ba729c85ebfd049db90d17c33 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Thu, 25 Nov 2021 12:27:26 +0100 Subject: [PATCH] fix check of thumbnail id --- openpype/tools/loader/widgets.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openpype/tools/loader/widgets.py b/openpype/tools/loader/widgets.py index db86d1cd4e..ea45fd4364 100644 --- a/openpype/tools/loader/widgets.py +++ b/openpype/tools/loader/widgets.py @@ -813,8 +813,9 @@ class ThumbnailWidget(QtWidgets.QLabel): {"_id": doc_id}, {"data.thumbnail_id"} ) - - thumbnail_id = doc.get("data", {}).get("thumbnail_id") + thumbnail_id = None + if doc: + thumbnail_id = doc.get("data", {}).get("thumbnail_id") if thumbnail_id == self.current_thumb_id: if self.current_thumbnail is None: self.set_pixmap()