diff --git a/Editor/SetupOutfit.cs b/Editor/SetupOutfit.cs index f6d28c53..6c263c89 100644 --- a/Editor/SetupOutfit.cs +++ b/Editor/SetupOutfit.cs @@ -386,6 +386,14 @@ namespace nadena.dev.modular_avatar.core.editor private static bool ValidateSetupOutfit(GameObject gameObj) { Object obj; + + if (gameObj == null) + { + errorHeader = S("setup_outfit.err.header.notarget"); + errorMessageGroups = new string[] { S("setup_outfit.err.no_selection") }; + return false; + } + errorHeader = S_f("setup_outfit.err.header", gameObj.name); var xform = gameObj.transform; @@ -542,4 +550,4 @@ namespace nadena.dev.modular_avatar.core.editor return avatarHips != null && outfitHips != null; } } -} \ No newline at end of file +}