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

Commit

Permalink
null check dictionary type lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
Crzyrndm committed Dec 19, 2016
1 parent e39cbd4 commit fd8d41d
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion FilterExtension/Core.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace FilterExtensions
[KSPAddon(KSPAddon.Startup.MainMenu, true)]
public class Core : MonoBehaviour
{
public static readonly Version version = new Version(2, 8, 0, 0);
public static readonly Version version = new Version(2, 8, 0, 1);

private static Core instance;
public static Core Instance
Expand Down
2 changes: 1 addition & 1 deletion FilterExtension/Utility/PartType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ public static bool checkModuleNameType(AvailablePart part, string value)
return part.partPrefab.Modules.Contains<ModuleWheelSuspension>();

default: // use specialisation where I can to avoid the "slow" type checking this entails
if (Loaded_Modules.ContainsKey(value))
if (value != null && Loaded_Modules.ContainsKey(value))
{
Type string_type = Loaded_Modules[value];
foreach (PartModule pm in part.partPrefab.Modules)
Expand Down
Binary file modified GameData/000_FilterExtensions/FilterExtensions.dll
Binary file not shown.
Binary file modified Testing/FE_Testing.dll
Binary file not shown.

0 comments on commit fd8d41d

Please sign in to comment.