summaryrefslogtreecommitdiff
path: root/indra/llplugin/llpluginprocesschild.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llplugin/llpluginprocesschild.cpp')
-rw-r--r--indra/llplugin/llpluginprocesschild.cpp23
1 files changed, 15 insertions, 8 deletions
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)