summaryrefslogtreecommitdiff
path: root/indra/llplugin
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llplugin')
-rw-r--r--indra/llplugin/llpluginmessagepipe.cpp9
-rw-r--r--indra/llplugin/llpluginprocesschild.cpp23
2 files changed, 23 insertions, 9 deletions
diff --git a/indra/llplugin/llpluginmessagepipe.cpp b/indra/llplugin/llpluginmessagepipe.cpp
index cc193fca42..1d7ddc5592 100644
--- a/indra/llplugin/llpluginmessagepipe.cpp
+++ b/indra/llplugin/llpluginmessagepipe.cpp
@@ -304,7 +304,14 @@ void LLPluginMessagePipe::processInput(void)
while((delim = mInput.find(MESSAGE_DELIMITER, start)) != std::string::npos)
{
// Let the owner process this message
- mOwner->receiveMessageRaw(mInput.substr(start, delim - start));
+ if (mOwner)
+ {
+ mOwner->receiveMessageRaw(mInput.substr(start, delim - start));
+ }
+ else
+ {
+ LL_WARNS("Plugin") << "!mOwner" << LL_ENDL;
+ }
start = delim + 1;
}
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)