Merge remote-tracking branch 'origin/topic/vern/gh-2645'

* origin/topic/vern/gh-2645:
  fix for crash when specifying an unwriteable file to --profile-scripts (GH-2645)
This commit is contained in:
Johanna Amann 2023-01-11 09:00:47 +00:00
commit 7c54d1aa1c

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;