Skip to content

Commit

Permalink
pivy: avoid possible segfault when setting None to an SoSFImage field
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Nov 28, 2019
1 parent 2efd9a1 commit 58fdbdc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Mod/Arch/ArchWall.py
Expand Up @@ -1071,7 +1071,9 @@ def attach(self,vobj):
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)
Expand Down

0 comments on commit 58fdbdc

Please sign in to comment.