summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llscenemonitor.cpp17
-rwxr-xr-xindra/newview/llviewerregion.cpp10
2 files changed, 22 insertions, 5 deletions
diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp
index 7fdee2b2ad..f0c7a220a4 100644
--- a/indra/newview/llscenemonitor.cpp
+++ b/indra/newview/llscenemonitor.cpp
@@ -211,11 +211,19 @@ LLRenderTarget& LLSceneMonitor::getCaptureTarget()
void LLSceneMonitor::freezeAvatar(LLCharacter* avatarp)
{
- mAvatarPauseHandles.push_back(avatarp->requestPause());
+ if(mEnabled)
+ {
+ mAvatarPauseHandles.push_back(avatarp->requestPause());
+ }
}
void LLSceneMonitor::freezeScene()
{
+ if(!mEnabled)
+ {
+ return;
+ }
+
//freeze all avatars
for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
iter != LLCharacter::sInstances.end(); ++iter)
@@ -262,7 +270,7 @@ void LLSceneMonitor::capture()
static LLCachedControl<F32> scene_load_sample_time(gSavedSettings, "SceneLoadingMonitorSampleTime");
static bool force_capture = true;
- bool enabled = monitor_enabled || mDebugViewerVisible;
+ bool enabled = LLGLSLShader::sNoFixedFunction && (monitor_enabled || mDebugViewerVisible);
if(mEnabled != enabled)
{
if(mEnabled)
@@ -288,10 +296,9 @@ void LLSceneMonitor::capture()
force_capture = true;
}
- if((mRecordingTimer.getElapsedTimeF32() > scene_load_sample_time()
+ if(mEnabled
+ && (mRecordingTimer.getElapsedTimeF32() > scene_load_sample_time()
|| force_capture)
- && mEnabled
- && LLGLSLShader::sNoFixedFunction
&& last_capture_frame != gFrameCount)
{
force_capture = false;
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index e28ea6f988..c55ccce47a 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -1303,6 +1303,16 @@ void LLViewerRegion::killObject(LLVOCacheEntry* entry, std::vector<LLDrawable*>&
LLViewerObject* LLViewerRegion::addNewObject(LLVOCacheEntry* entry)
{
+ if(!entry || !entry->getEntry())
+ {
+ if(entry)
+ {
+ mImpl->mVisibleEntries.erase(entry);
+ entry->setState(LLVOCacheEntry::INACTIVE);
+ }
+ return NULL;
+ }
+
LLViewerObject* obj = NULL;
if(!entry->getEntry()->hasDrawable()) //not added to the rendering pipeline yet
{