Skip to content

Commit

Permalink
explicitly check if ERROR_OUTPUT is a stream object before attempting…
Browse files Browse the repository at this point in the history
… to open it
  • Loading branch information
embray committed Nov 23, 2018
1 parent 3eb2f2a commit afa635f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/error.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ UInt OpenErrorOutput( void )
ret = OpenOutput(CONST_CSTR_STRING(ERROR_OUTPUT));
}
else {
ret = OpenOutputStream(ERROR_OUTPUT);
if (CALL_1ARGS(IsOutputStream, ERROR_OUTPUT) == True) {
ret = OpenOutputStream(ERROR_OUTPUT);
}
}
}

Expand Down

0 comments on commit afa635f

Please sign in to comment.