From 58fdbdc4d1978df73571348c0be6c969454022f4 Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 28 Nov 2019 15:44:42 +0100 Subject: [PATCH] pivy: avoid possible segfault when setting None to an SoSFImage field --- src/Mod/Arch/ArchWall.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Mod/Arch/ArchWall.py b/src/Mod/Arch/ArchWall.py index 5fb1d34586..da1837c194 100644 --- a/src/Mod/Arch/ArchWall.py +++ b/src/Mod/Arch/ArchWall.py @@ -1071,7 +1071,9 @@ class _ViewProviderWall(ArchComponent.ViewProviderComponent): self.Object = vobj.Object from pivy import coin tex = coin.SoTexture2() - tex.image = Draft.loadTexture(Draft.svgpatterns()['simple'][1], 128) + image = Draft.loadTexture(Draft.svgpatterns()['simple'][1], 128) + if not image is None: + tex.image = image texcoords = coin.SoTextureCoordinatePlane() s = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch").GetFloat("patternScale",0.01) texcoords.directionS.setValue(s,0,0)