diff options
author | Gunnar Sletta <gunnar.sletta@nokia.com> | 2012-02-24 12:23:51 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-24 14:05:17 +0100 |
commit | 17790b069d5ce4ec4ca31f7ff1f00b268ddc0e29 (patch) | |
tree | 434496685f123b882f14e160ce3a8c93153944c2 /src/quick/scenegraph/qsgcontextplugin.cpp | |
parent | 5cc9b79675c9d1e17e0153ca2ddf42771a09cfe3 (diff) |
The plugin is cleaned up by the plugin loader so don't double-delete
Change-Id: I8bac5b6e1960cbc38575c76f02aa6c6c90700331
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/quick/scenegraph/qsgcontextplugin.cpp')
-rw-r--r-- | src/quick/scenegraph/qsgcontextplugin.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/quick/scenegraph/qsgcontextplugin.cpp b/src/quick/scenegraph/qsgcontextplugin.cpp index 026afb2d56..6382d42462 100644 --- a/src/quick/scenegraph/qsgcontextplugin.cpp +++ b/src/quick/scenegraph/qsgcontextplugin.cpp @@ -71,7 +71,6 @@ struct QSGAdaptionPluginData ~QSGAdaptionPluginData() { - delete factory; } bool tried; @@ -102,15 +101,15 @@ QSGAdaptionPluginData *contextFactory() if (!device.isEmpty()) { plugin->factory = qobject_cast<QSGContextFactoryInterface*>(loader()->instance(device)); plugin->deviceName = device; - } #ifndef QT_NO_DEBUG - if (!device.isEmpty()) { - qWarning("Could not create scene graph context for device '%s'" - " - check that plugins are installed correctly in %s", - qPrintable(device), - qPrintable(QLibraryInfo::location(QLibraryInfo::PluginsPath))); - } + if (!plugin->factory) { + qWarning("Could not create scene graph context for device '%s'" + " - check that plugins are installed correctly in %s", + qPrintable(device), + qPrintable(QLibraryInfo::location(QLibraryInfo::PluginsPath))); + } #endif + } #endif // QT_NO_LIBRARY || QT_NO_SETTINGS } |