From a18b1e07901c1e1ef522d80c585fb91a7f12679c Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 20 May 2008 02:30:55 +0000 Subject: [PATCH] fixed a bug where if a plugin errored during the instantiation process, then its index could be reported as -1 from debug messages --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402156 --- core/DebugReporter.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/DebugReporter.cpp b/core/DebugReporter.cpp index 4572ebaf..d86fa111 100644 --- a/core/DebugReporter.cpp +++ b/core/DebugReporter.cpp @@ -181,6 +181,9 @@ int DebugReport::_GetPluginIndex(IPluginContext *ctx) } iter->Release(); - return -1; + + /* If we don't know which plugin this is, it's one being loaded. Fake its index for now. */ + + return g_PluginSys.GetPluginCount() + 1; }