pivy: avoid possible segfault when setting None to an SoSFImage field
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user