mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-30 18:22:52 +08:00
fix: Setup Outfit cause NRE when nothing selected (#1197)
This commit is contained in:
parent
fd3de6e680
commit
3b86822547
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user