File fix-bsc1124647-segfault.patch of Package fwbuilder
Index: fwbuilder-5.3.7/src/libgui/ObjectManipulator.cpp
===================================================================
--- fwbuilder-5.3.7.orig/src/libgui/ObjectManipulator.cpp
+++ fwbuilder-5.3.7/src/libgui/ObjectManipulator.cpp
@@ -112,7 +112,7 @@ ObjectManipulator::~ObjectManipulator()
}
ObjectManipulator::ObjectManipulator(QWidget *parent):
- QWidget(parent), current_tree_view(0)
+ QWidget(parent), current_tree_view(0), lastClickedItem(0)
{
m_objectManipulator = new Ui::ObjectManipulator_q;
m_objectManipulator->setupUi(this);
Index: fwbuilder-5.3.7/src/libgui/ObjectManipulator_create_new.cpp
===================================================================
--- fwbuilder-5.3.7.orig/src/libgui/ObjectManipulator_create_new.cpp
+++ fwbuilder-5.3.7/src/libgui/ObjectManipulator_create_new.cpp
@@ -249,8 +249,11 @@ void ObjectManipulator::createNewObject(
//directly move object to it's subfolder
list<FWObject*> newObjs;
newObjs.push_back(new_obj);
- moveItems(lastClickedItem, newObjs);
- lastClickedItem = NULL;
+ if (lastClickedItem!=NULL)
+ {
+ moveItems(lastClickedItem, newObjs);
+ lastClickedItem = NULL;
+ }
m_project->undoStack->push(macro);
}