Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Crash when the EditorTweaks plugins is unloaded

(1/1)

oBFusCATed:
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
             {

--- End code ---

Tested on trunk @ head, gentoo linux 64bit

MortenMacFly:

--- Quote from: oBFusCATed on August 22, 2010, 12:44:10 am ---And here is the fix:

--- End quote ---
Good catch! Applied.

Navigation

[0] Message Index

Go to full version