From da295a731786163c5397e110ef9e1396b52fa22f Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 23 Mar 2023 23:27:47 +0100 Subject: [PATCH] App: in PropertyPythonObject::fromString only assign a dict to __dict__ attribute --- src/App/PropertyPythonObject.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/App/PropertyPythonObject.cpp b/src/App/PropertyPythonObject.cpp index edf46f20c9..e55d3e9825 100644 --- a/src/App/PropertyPythonObject.cpp +++ b/src/App/PropertyPythonObject.cpp @@ -136,7 +136,9 @@ void PropertyPythonObject::fromString(const std::string& repr) state.apply(args); } else if (this->object.hasAttr("__dict__")) { - this->object.setAttr("__dict__", res); + if (!res.isNone()) { + this->object.setAttr("__dict__", res); + } } else { this->object = res;