OSDN Git Service

Bug fix: Late crash when closing Creator while building debugging helper (QTCREATORBU...
authorLeandro Melo <leandro.melo@nokia.com>
Tue, 8 Jun 2010 11:55:50 +0000 (13:55 +0200)
committerLeandro Melo <leandro.melo@nokia.com>
Tue, 8 Jun 2010 12:00:57 +0000 (14:00 +0200)
Reviewed-by: hjk
src/plugins/coreplugin/coreimpl.cpp
src/plugins/coreplugin/coreimpl.h
src/plugins/projectexplorer/debugginghelper.cpp

index c6da636..d072e8d 100644 (file)
@@ -61,6 +61,11 @@ CoreImpl::CoreImpl(MainWindow *mainwindow)
     m_mainwindow = mainwindow;
 }
 
+CoreImpl::~CoreImpl()
+{
+    m_instance = 0;
+}
+
 QStringList CoreImpl::showNewItemDialog(const QString &title,
                                         const QList<IWizard *> &wizards,
                                         const QString &defaultLocation)
index d04defd..50a8a67 100644 (file)
@@ -42,7 +42,7 @@ class CoreImpl : public ICore
 
 public:
     CoreImpl(MainWindow *mainwindow);
-    ~CoreImpl() {}
+    ~CoreImpl();
 
     QStringList showNewItemDialog(const QString &title,
                                   const QList<IWizard *> &wizards,
index 495996e..9c09155 100644 (file)
@@ -113,6 +113,8 @@ QStringList DebuggingHelperLibrary::debuggingHelperLibraryLocationsByInstallData
 
 QString DebuggingHelperLibrary::debuggingHelperLibraryByInstallData(const QString &qtInstallData)
 {
+    if (!Core::ICore::instance())
+        return QString();
     const QString dumperSourcePath = Core::ICore::instance()->resourcePath() + QLatin1String("/gdbmacros/");
     QDateTime lastModified = QFileInfo(dumperSourcePath + "gdbmacros.cpp").lastModified();
     // We pretend that the lastmodified of gdbmacros.cpp is 5 minutes before what the file system says