From a1e6383b5f79a14d3394f5d849a1386ff72341c3 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 22 Aug 2018 19:32:50 +0300 Subject: MAINT-8926 Don't allow overwritting default preset --- indra/newview/llpresetsmanager.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llpresetsmanager.cpp') 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 name_list; -- cgit v1.2.3