From 8bf47ba3de7920726a50121ba1dcff1f186eae10 Mon Sep 17 00:00:00 2001 From: Clement Ducarteron Date: Fri, 24 Mar 2023 11:04:47 +0100 Subject: [PATCH] Fix error when removing preview collection --- __init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index cbdf153..2032d7b 100644 --- a/__init__.py +++ b/__init__.py @@ -50,7 +50,12 @@ def register(): def unregister(): - bpy.utils.previews.remove(ASSET_PREVIEWS) + try: + bpy.utils.previews.remove(ASSET_PREVIEWS) + except Exception as e: + pass + # print(f"!-- {e} --!") + # print(f"No preview collection found. {ASSET_PREVIEWS} can't be remove.") if bpy.app.background: return