Skip to content

Commit 99aabc5

Browse files
committed
[CRT] Fix __call_atexit
This prevents a first chance exception on process cleanup.
1 parent eba2bbd commit 99aabc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sdk/lib/crt/startup/atonexit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ void __call_atexit(void)
3232
/* Note: should only be called with the exit lock held */
3333
_PVFV *first, *last;
3434

35-
if (!__onexitbegin)
35+
if (!__onexitbegin || (__onexitbegin == (void*)(-1)))
3636
return;
3737

3838
first = (_PVFV *)_decode_pointer(__onexitbegin);

0 commit comments

Comments
 (0)