mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-14 06:12:47 -06:00
ide: Empty builder issue crash fix refactored #1186
git-svn-id: svn://ultimatepp.org/upp/trunk@8688 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
494fd006c9
commit
a21be51e73
1 changed files with 5 additions and 8 deletions
|
|
@ -445,9 +445,7 @@ void BuildMethods::Load()
|
|||
VectorMap<String, String> map;
|
||||
String fn = ConfigFile(ff.GetName());
|
||||
if(LoadVarFile(fn, map)) {
|
||||
int builderIdx = map.Find("BUILDER");
|
||||
String builderName = builderIdx >= 0 ? map[builderIdx] : "";
|
||||
|
||||
String builderName = map.Get("BUILDER", Null);
|
||||
int setupIdx = -1;
|
||||
String prefix;
|
||||
for(int i = 0; i < setups.GetCount(); i++) {
|
||||
|
|
@ -499,7 +497,7 @@ bool BuildMethods::Save()
|
|||
VectorMap<String, String> map;
|
||||
for(int j = 1; j < method.GetIndexCount(); j++)
|
||||
map.Add(method.GetId(j).ToString(), method.Get(i, j));
|
||||
if(map.Get("BUILDER", "") != "SCRIPT")
|
||||
if(map.Get("BUILDER", Null) != "SCRIPT")
|
||||
map.RemoveKey("SCRIPT");
|
||||
|
||||
map = SieveBuilderVars(map);
|
||||
|
|
@ -616,7 +614,7 @@ VectorMap<String, String> BuildMethods::SieveBuilderVars(const VectorMap<String,
|
|||
{
|
||||
VectorMap<String, String> sievedMap;
|
||||
|
||||
String builder = map.Get("BUILDER");
|
||||
String builder = map.Get("BUILDER", Null);
|
||||
if(builder.IsEmpty())
|
||||
return VectorMap<String, String>();
|
||||
|
||||
|
|
@ -648,9 +646,8 @@ VectorMap<String, String> BuildMethods::MapBuilderVars(const VectorMap<String, S
|
|||
{
|
||||
VectorMap<String, String> mapedMap;
|
||||
Index<String> varsToMaped;
|
||||
|
||||
int builderIdx = map.Find("BUILDER");
|
||||
String builder = builderIdx >= 0 ? map[builderIdx] : "";
|
||||
|
||||
String builder = map.Get("BUILDER", Null);
|
||||
if(builder.IsEmpty())
|
||||
return VectorMap<String, String>();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue