diff --git a/src/Mod/Start/StartPage/StartPage.py b/src/Mod/Start/StartPage/StartPage.py
index 20589363bf..89a30e4e4f 100644
--- a/src/Mod/Start/StartPage/StartPage.py
+++ b/src/Mod/Start/StartPage/StartPage.py
@@ -415,15 +415,18 @@ def handle():
for cfolder in cfolders.split(";;"): # allow several paths separated by ;;
if not os.path.isdir(cfolder):
cfolder = os.path.dirname(cfolder)
- SECTION_CUSTOM += encode("
"+os.path.basename(os.path.normpath(cfolder))+"
")
- SECTION_CUSTOM += ""
- for basename in os.listdir(cfolder):
- filename = os.path.join(cfolder,basename)
- SECTION_CUSTOM += encode(buildCard(filename,method="LoadCustom.py?filename="+str(dn)+"_"))
- SECTION_CUSTOM += "
"
- # hide the custom section tooltip if custom section is set (users know about it if they enabled it)
- HTML = HTML.replace("id=\"customtip\"","id=\"customtip\" style=\"display:none;\"")
- dn += 1
+ if not os.path.exists(cfolder):
+ FreeCAD.Console.PrintWarning("Custom folder not found: %s" % cfolder)
+ else:
+ SECTION_CUSTOM += encode(""+os.path.basename(os.path.normpath(cfolder))+"
")
+ SECTION_CUSTOM += ""
+ for basename in os.listdir(cfolder):
+ filename = os.path.join(cfolder,basename)
+ SECTION_CUSTOM += encode(buildCard(filename,method="LoadCustom.py?filename="+str(dn)+"_"))
+ SECTION_CUSTOM += "
"
+ # hide the custom section tooltip if custom section is set (users know about it if they enabled it)
+ HTML = HTML.replace("id=\"customtip\"","id=\"customtip\" style=\"display:none;\"")
+ dn += 1
HTML = HTML.replace("SECTION_CUSTOM",SECTION_CUSTOM)
# build IMAGE_SRC paths