From 5be81c6487d1c43638797c304d8dfffdecdc2616 Mon Sep 17 00:00:00 2001 From: sfb Date: Wed, 1 Jun 2011 07:44:44 -0500 Subject: [PATCH] Changed: Fixed a bug with the log plugin causing crashes when the apply button was clicked for settings. --HG-- branch : branch-mission-compiler-qt --- .../object_viewer_qt/src/plugins/log/log_plugin.cpp | 2 +- .../src/plugins/log/log_settings_page.cpp | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.cpp index 2f88200ec..b1f3cbc18 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.cpp @@ -103,7 +103,7 @@ namespace Plugin QString CLogPlugin::name() const { - return "NeL Log"; + return "LogPlugin"; } QString CLogPlugin::version() const diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_settings_page.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_settings_page.cpp index f75d6ab37..02d6cd24d 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_settings_page.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_settings_page.cpp @@ -99,11 +99,14 @@ namespace Plugin writeSettings(); ExtensionSystem::IPluginManager *p = Core::ICore::instance()->pluginManager(); - ExtensionSystem::IPlugin *plugin = p->pluginByName("LogPlugin")->plugin(); - CLogPlugin* lp = dynamic_cast(plugin); - if (lp) + ExtensionSystem::IPluginSpec *spec = p->pluginByName("LogPlugin"); + + if(spec) { - lp->setDisplayers(); + ExtensionSystem::IPlugin *plugin = spec->plugin(); + CLogPlugin* lp = dynamic_cast(plugin); + if (lp) + lp->setDisplayers(); } }