From 41ddb9663d6c1ea807970d9edec709ff7145a1a1 Mon Sep 17 00:00:00 2001
From: Kai Koehne <kai.koehne@nokia.com>
Date: Mon, 22 Mar 2010 13:00:09 +0100
Subject: [PATCH] QmlDesigner: Fix MetaInfoException on application exit

Don't (try to) initialize the static metainfo db on exit, just so
that you can delete it.
---
 src/plugins/qmldesigner/core/metainfo/metainfo.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/plugins/qmldesigner/core/metainfo/metainfo.cpp b/src/plugins/qmldesigner/core/metainfo/metainfo.cpp
index 7a1a0f5c98c..a550c351f3a 100644
--- a/src/plugins/qmldesigner/core/metainfo/metainfo.cpp
+++ b/src/plugins/qmldesigner/core/metainfo/metainfo.cpp
@@ -570,7 +570,9 @@ MetaInfo MetaInfo::global()
   */
 void MetaInfo::clearGlobal()
 {
-    MetaInfo::global().m_p->clear();
+    if (s_global.m_p->m_isInitialized) {
+        s_global.m_p->clear();
+    }
 }
 
 void MetaInfo::setPluginPaths(const QStringList &paths)
-- 
GitLab