crt: Add check that __mingw_GetSectionCount() call has not failed

Signed-off-by: LIU Hao <lh_mouse@126.com>
diff --git a/mingw-w64-crt/crt/pseudo-reloc.c b/mingw-w64-crt/crt/pseudo-reloc.c
index 580dad1..eef295b 100644
--- a/mingw-w64-crt/crt/pseudo-reloc.c
+++ b/mingw-w64-crt/crt/pseudo-reloc.c
@@ -565,6 +565,8 @@
   ++was_init;
 #ifdef __MINGW64_VERSION_MAJOR
   mSecs = __mingw_GetSectionCount ();
+  if (!mSecs)
+    return;
   the_secs = (sSecInfo *) alloca (sizeof (sSecInfo) * (size_t) mSecs);
   maxSections = 0;
 #endif /* __MINGW64_VERSION_MAJOR */