fix for crash when specifying an unwriteable file to --profile-scripts (GH-2645)

This commit is contained in:
Vern Paxson 2023-01-07 18:47:14 -08:00
parent 83a6faec3c
commit 7bf87b6347

View file

@ -177,7 +177,10 @@ void activate_script_profiling(const char* fn)
{
f = fopen(fn, "w");
if ( ! f )
reporter->FatalError("can't open %s to record scripting profile", fn);
{
fprintf(stderr, "ERROR: Can't open %s to record scripting profile\n", fn);
exit(1);
}
}
else
f = stdout;