Skip to content
This repository has been archived by the owner on Sep 7, 2021. It is now read-only.

Commit

Permalink
null string kills settings window
Browse files Browse the repository at this point in the history
  • Loading branch information
Crzyrndm committed Jul 22, 2015
1 parent 63a36bb commit cd7c17a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions FilterExtension/Core.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ public class Core : MonoBehaviour
public bool debug = false;
public bool setAdvanced = true;
public bool replaceFbM = true;
public string categoryDefault;
public string subCategoryDefault;
public string categoryDefault = "";
public string subCategoryDefault = "";

const string fallbackIcon = "stockIcon_fallback";

Expand Down
3 changes: 1 addition & 2 deletions FilterExtension/Utility/PartType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static bool checkSubcategory(AvailablePart part, string value, int depth)
foreach (string s in value.Split(',').Select(str => str.Trim()))
{
FilterExtensions.ConfigNodes.customSubCategory subcategory;
if (Core.Instance.subCategoriesDict.TryGetValue(s, out subcategory) && subcategory.checkFilters(part, depth))
if (Core.Instance.subCategoriesDict.TryGetValue(s, out subcategory) && subcategory.checkFilters(part, depth + 1))
return true;
}
return false;
Expand Down Expand Up @@ -90,7 +90,6 @@ public static bool checkCategory(AvailablePart part, string value)
break;
}
}

return false;
}

Expand Down
Binary file modified GameData/000_FilterExtensions/FilterExtensions.dll
Binary file not shown.

0 comments on commit cd7c17a

Please sign in to comment.