Check to make sure pointer isnt null after allocation. Fixes bug 1103.
Modified: trunk/reactos/lib/kernel32/misc/errormsg.c

Modified: trunk/reactos/lib/kernel32/misc/errormsg.c
--- trunk/reactos/lib/kernel32/misc/errormsg.c	2005-12-11 05:34:11 UTC (rev 20050)
+++ trunk/reactos/lib/kernel32/misc/errormsg.c	2005-12-11 05:49:02 UTC (rev 20051)
@@ -177,6 +177,10 @@
     if (dwFlags & FORMAT_MESSAGE_FROM_STRING)
     {
         from = HeapAlloc( GetProcessHeap(), 0, strlen((LPCSTR)lpSource)+1 );
+        if (form == NULL)
+        {
+            return 0;
+        }
         strcpy( from, (LPCSTR)lpSource );
     }
     else {