From 5206f0fe91d87665c0a4b19edb135f4e6ceb9dc7 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 18:23:12 +0000 Subject: CID-53 Checker: FORWARD_NULL Function: LLPluginProcessChild::idle() File: /indra/llplugin/llpluginprocesschild.cpp --- indra/llplugin/llpluginprocesschild.cpp | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'indra/llplugin') diff --git a/indra/llplugin/llpluginprocesschild.cpp b/indra/llplugin/llpluginprocesschild.cpp index 0f3254d78d..52b5a319ec 100644 --- a/indra/llplugin/llpluginprocesschild.cpp +++ b/indra/llplugin/llpluginprocesschild.cpp @@ -278,14 +278,21 @@ bool LLPluginProcessChild::isDone(void) void LLPluginProcessChild::sendMessageToPlugin(const LLPluginMessage &message) { - std::string buffer = message.generate(); - - LL_DEBUGS("Plugin") << "Sending to plugin: " << buffer << LL_ENDL; - LLTimer elapsed; - - mInstance->sendMessage(buffer); - - mCPUElapsed += elapsed.getElapsedTimeF64(); + if (mInstance) + { + std::string buffer = message.generate(); + + LL_DEBUGS("Plugin") << "Sending to plugin: " << buffer << LL_ENDL; + LLTimer elapsed; + + mInstance->sendMessage(buffer); + + mCPUElapsed += elapsed.getElapsedTimeF64(); + } + else + { + LL_WARNS("Plugin") << "mInstance == NULL" << LL_ENDL; + } } void LLPluginProcessChild::sendMessageToParent(const LLPluginMessage &message) -- cgit v1.2.3