Here I have a crash in cmakeproject.cpp when opening 
a cmake configuration.

Reading a bit the history of cmakeproject.cpp, 
I tried attached patch, then it doesn't crash any more 
but it also doesn't work any more:
no project nor files in the project explorer.

Peter


diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp 
b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
index 6bc709c..8dae1e6 100644
--- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
@@ -487,8 +487,12 @@ bool CMakeProject::fromMap(const QVariantMap &map)
         if (copw.exec() != QDialog::Accepted)
             return false;
 
-        CMakeBuildConfiguration *bc =
-                static_cast<CMakeBuildConfiguration 
*>(t->buildConfigurations().at(0));
+        CMakeBuildConfiguration *bc = 0;
+        if (t->buildConfigurations().isEmpty()) {
+            bc = new CMakeBuildConfiguration(t);
+        } else {
+            bc = static_cast<CMakeBuildConfiguration 
*>(t->buildConfigurations().at(0));
+        }
         bc->setMsvcVersion(copw.msvcVersion());
         if (!copw.buildDirectory().isEmpty())
             bc->setBuildDirectory(copw.buildDirectory());
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-creator

Reply via email to