# HG changeset patch
# User Edouard Tisserant
# Date 1623245280 -7200
# Node ID 9233e60a83179287013cd0fa68994811d4eca2ac
# Parent  6d4ff271ebf1c12c44ff2fbda3d703f8f4caa0c0
SVGHMI: fix exception when stored widget library path does not exist anymore

diff -r 6d4ff271ebf1 -r 9233e60a8317 svghmi/ui.py
--- a/svghmi/ui.py	Wed Jun 09 10:06:23 2021 +0200
+++ b/svghmi/ui.py	Wed Jun 09 15:28:00 2021 +0200
@@ -160,7 +160,7 @@
         self.root = self.AddRoot(root_display_name)
         self.SetPyData(self.root, None)
 
-        if lib_dir is not None:
+        if lib_dir is not None and os.path.exists(lib_dir):
             self._recurseTree(lib_dir, self.root, [])
             self.Expand(self.root)