Skip to content

Commit a4e8c2b

Browse files
committed
COMMON: fix error handling segfault
1 parent 8f005d8 commit a4e8c2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/common/sberr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ void err_throw_str(const char *err) {
413413

414414
// throw internal error
415415
void err_throw(const char *fmt, ...) {
416-
if (!gsb_last_error) {
416+
if (!gsb_last_error && prog_source) {
417417
va_list ap;
418418
va_start(ap, fmt);
419419
char *err = malloc(SB_TEXTLINE_SIZE + 1);

0 commit comments

Comments
 (0)