Skip to content

Commit c257304

Browse files
committed
#4803 Fix crash on cameraUnderWater
updateEnvironment tried to access dead camera
1 parent 6fc138d commit c257304

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

indra/newview/llfloaterfixedenvironment.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,15 @@ void LLFloaterFixedEnvironment::onClose(bool app_quitting)
134134
{
135135
doCloseInventoryFloater(app_quitting);
136136

137-
LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
138-
LLEnvironment::instance().setCurrentEnvironmentSelection(LLEnvironment::ENV_LOCAL);
139-
LLEnvironment::instance().clearEnvironment(LLEnvironment::ENV_EDIT);
137+
if (!app_quitting)
138+
{
139+
LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
140+
LLEnvironment::instance().setCurrentEnvironmentSelection(LLEnvironment::ENV_LOCAL);
141+
LLEnvironment::instance().clearEnvironment(LLEnvironment::ENV_EDIT);
140142

141-
mSettings.reset();
142-
syncronizeTabs();
143+
mSettings.reset();
144+
syncronizeTabs();
145+
}
143146
}
144147

145148
void LLFloaterFixedEnvironment::refresh()

0 commit comments

Comments
 (0)