summaryrefslogtreecommitdiff
path: root/indra/llplugin
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2017-06-06 16:06:28 +0300
committerandreykproductengine <andreykproductengine@lindenlab.com>2017-06-06 16:06:28 +0300
commitd3a1c4cda49cc1b113abbdb175c557456581efac (patch)
tree94e297f0e69f052b3382737fe197de1c84bd567a /indra/llplugin
parentd700552b449f3c2bcaee46f61fe3290f57e58fe9 (diff)
MAINT-7462 check pointer to avoid allocation crash in llpluginclassmedia
Diffstat (limited to 'indra/llplugin')
-rw-r--r--indra/llplugin/llpluginclassmedia.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index f1b6fe0a12..680017204c 100644
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -224,7 +224,14 @@ void LLPluginClassMedia::idle(void)
void *addr = mPlugin->getSharedMemoryAddress(mTextureSharedMemoryName);
// clear texture memory to avoid random screen visual fuzz from uninitialized texture data
- memset( addr, 0x00, newsize );
+ if (addr)
+ {
+ memset( addr, 0x00, newsize );
+ }
+ else
+ {
+ LL_WARNS("Plugin") << "Failed to get previously created shared memory address: " << mTextureSharedMemoryName << " size: " << mTextureSharedMemorySize << LL_ENDL;
+ }
// We could do this to force an update, but textureValid() will still be returning false until the first roundtrip to the plugin,
// so it may not be worthwhile.