Skip to content

Commit 0d9dd37

Browse files
zsxOldes
authored andcommitted
ATRONIX: Check pointer against NULL
Reported by coverity (cherry picked from commit 7a961dd)
1 parent d31b9f4 commit 0d9dd37

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/core/c-error.c

+1
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ static REBOL_STATE Top_State; // Boot var: holds error state during boot
324324

325325
if (num) {
326326
obj1 = Find_Word_Value(frame, SYM_CODE);
327+
if (!obj1) return 0;
327328
*num = VAL_INT32(obj1)
328329
+ Find_Word_Index(frame, VAL_WORD_SYM(&error->id), FALSE)
329330
- Find_Word_Index(frame, SYM_TYPE, FALSE) - 1;

0 commit comments

Comments
 (0)