Update shapes.py

Check for non-existent file instead of trying to use it and possibly segfaulting.
This commit is contained in:
cactrot
2020-09-26 07:26:34 -04:00
committed by GitHub
parent 26de7bc9c2
commit 6b8d486860

View File

@ -2391,7 +2391,7 @@ class Compound(Shape, Mixin3D):
mgr = Font_FontMgr.GetInstance_s()
if fontPath:
if fontPath and not mgr.CheckFont(TCollection_AsciiString(fontPath)).IsNull():
system_font = Font_SystemFont(TCollection_AsciiString(font))
system_font.SetFontPath(font_kind, TCollection_AsciiString(fontPath))