Browse Source

Fix potential Python File Node upgrade crash

pull/133/head
Adam Johnson 5 years ago
parent
commit
a3ed2f0178
Signed by: Hoikas
GPG Key ID: 0B6515D6FF6F271E
  1. 7
      korman/nodes/node_python.py

7
korman/nodes/node_python.py

@ -370,8 +370,11 @@ class PlasmaPythonFileNode(PlasmaVersionedNode, bpy.types.Node):
text_id = bpy.data.texts.get(self.filename, None)
if text_id is None:
path = Path(self.filepath)
if path.exists():
text_id = bpy.data.texts.load(self.filepath)
try:
if path.exists():
text_id = bpy.data.texts.load(self.filepath)
except OSError:
pass
with self.NoUpdate():
self.text_id = text_id
self.property_unset("filepath")

Loading…
Cancel
Save