Commit 8582664c authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner: fixes crash bug (WriteLocker)

ModelNode::addChildNode() crashed
parent de0beff4
...@@ -583,7 +583,6 @@ void ModelNode::removeProperty(const QString &name) ...@@ -583,7 +583,6 @@ void ModelNode::removeProperty(const QString &name)
*/ */
ModelNode ModelNode::addChildNode(const QString &nodeTypeString, int majorVersion, int minorVersion, const QString &propertyName, const PropertyListType &propertyList) ModelNode ModelNode::addChildNode(const QString &nodeTypeString, int majorVersion, int minorVersion, const QString &propertyName, const PropertyListType &propertyList)
{ {
Internal::WriteLocker locker(m_model.data());
if (!isValid()) { if (!isValid()) {
Q_ASSERT_X(isValid(), Q_FUNC_INFO, "model node is invalid"); Q_ASSERT_X(isValid(), Q_FUNC_INFO, "model node is invalid");
throw InvalidModelNodeException(__LINE__, __FUNCTION__, __FILE__); throw InvalidModelNodeException(__LINE__, __FUNCTION__, __FILE__);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment