Fix crash when saving camera preset

master
Ansariel 2020-05-28 15:51:54 +02:00
parent e2cbdb339f
commit de152eda9c
1 changed files with 1 additions and 2 deletions

View File

@ -90,10 +90,9 @@ void LLFloaterPreferenceViewAdvanced::onSavePreset()
LLFloaterReg::hideInstance("load_pref_preset", PRESETS_CAMERA);
LLSD key;
key["subdirectory"] = PRESETS_CAMERA;
std::string current_preset = gSavedSettings.getString("PresetCameraActive");
bool is_custom_preset = current_preset != "" && !LLPresetsManager::getInstance()->isDefaultCameraPreset(current_preset);
key["index"] = is_custom_preset ? 1 : 0;
LLFloaterReg::showInstance("save_pref_preset", key);
LLFloaterReg::showInstance("save_camera_preset", key);
}
// </FS:Ansariel>