summaryrefslogtreecommitdiff
path: root/indra/newview/llpresetsmanager.cpp
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2018-08-22 19:32:50 +0300
committerandreykproductengine <andreykproductengine@lindenlab.com>2018-08-22 19:32:50 +0300
commita1e6383b5f79a14d3394f5d849a1386ff72341c3 (patch)
tree233cff4c6913a707ee8285907bfdda68273c0fe1 /indra/newview/llpresetsmanager.cpp
parentc24f638088f3d67ceebe82520787a4d344ebd72f (diff)
MAINT-8926 Don't allow overwritting default preset
Diffstat (limited to 'indra/newview/llpresetsmanager.cpp')
-rw-r--r--indra/newview/llpresetsmanager.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp
index 96818d5a21..df93572508 100644
--- a/indra/newview/llpresetsmanager.cpp
+++ b/indra/newview/llpresetsmanager.cpp
@@ -138,6 +138,11 @@ bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string n
{
name = PRESETS_DEFAULT;
}
+ if (!createDefault && name == PRESETS_DEFAULT)
+ {
+ LL_WARNS() << "Should not overwrite default" << LL_ENDL;
+ return false;
+ }
bool saved = false;
std::vector<std::string> name_list;