Fixed the segmentation fault in dotnettool (#437)
[platform/core/dotnet/launcher.git] / NativeLauncher / tool / dotnettool.cc
index 24d5e48..4343b49 100644 (file)
@@ -188,6 +188,12 @@ int main(int argc, char* argv[])
                }
        }
 
+       if (args.size() == 0) {
+               _SERR("The command is missing");
+               DisplayUsage();
+               return -1;
+       }
+
        if (opt->flags & NI_FLAGS_INPUT_BUBBLE_REF && !(opt->flags & NI_FLAGS_INPUT_BUBBLE)) {
                _SERR("--inputbubbleref option should be used with --inputbubble option");
                DisplayUsage();