From af0e1d58ef80080bcf9281325563403465ce68ee Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Sat, 17 Jun 2017 10:24:47 -0700 Subject: [PATCH] obj2sdf -> don't crash when no name is given, remind user of --fileName=... --- Extras/obj2sdf/obj2sdf.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Extras/obj2sdf/obj2sdf.cpp b/Extras/obj2sdf/obj2sdf.cpp index 7264d704b..488b24d54 100644 --- a/Extras/obj2sdf/obj2sdf.cpp +++ b/Extras/obj2sdf/obj2sdf.cpp @@ -40,7 +40,11 @@ int main(int argc, char* argv[]) b3CommandLineArgs args(argc,argv); char* fileName; args.GetCmdLineArgument("fileName",fileName); - + if (fileName==0) + { + printf("required --fileName=\"name\""); + exit(0); + } std::string matLibName = StripExtension(fileName); printf("fileName = %s\n", fileName);