Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: oBFusCATed on August 22, 2010, 12:44:10 am

Title: Crash when the EditorTweaks plugins is unloaded
Post by: oBFusCATed on August 22, 2010, 12:44:10 am
Hello,

My CB started to crash when I've disabled the EditorTweaks plugins.
The crash happens when I right click in the editor.

And here is the fix:

Code
Index: src/sdk/pluginmanager.cpp
===================================================================
--- src/sdk/pluginmanager.cpp   (revision 6508)
+++ src/sdk/pluginmanager.cpp   (working copy)
@@ -1399,7 +1399,7 @@
     for (unsigned int i = 0; i < m_Plugins.GetCount(); ++i)
     {
         cbPlugin* plug = m_Plugins[i]->plugin;
-        if (plug)
+        if (plug && plug->IsAttached())
         {
             try
             {

Tested on trunk @ head, gentoo linux 64bit
Title: Re: Crash when the EditorTweaks plugins is unloaded
Post by: MortenMacFly on August 22, 2010, 02:16:38 pm
And here is the fix:
Good catch! Applied.