diff options
-rw-r--r-- | runtime/GCCLibraries/crtend/crtend.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/GCCLibraries/crtend/crtend.c b/runtime/GCCLibraries/crtend/crtend.c index 58f1bf5f9a..baac8a1b95 100644 --- a/runtime/GCCLibraries/crtend/crtend.c +++ b/runtime/GCCLibraries/crtend/crtend.c @@ -49,8 +49,9 @@ void __main(void) { abort(); /* Should be able to install ONE atexit handler! */ /* FIXME: This should sort the list by priority! */ - for (; R->FP; ++R) - R->FP(); + if (R->FP) + for (; R->FP; ++R) + R->FP(); } static void run_destructors(void) { |