Author: gschneider
Date: Mon Aug 24 01:03:55 2009
New Revision: 42894
URL:
http://svn.reactos.org/svn/reactos?rev=42894&view=rev
Log:
Handle failed memory allocation
Modified:
trunk/reactos/dll/win32/gdi32/objects/text.c
Modified: trunk/reactos/dll/win32/gdi32/objects/text.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/te…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/text.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/gdi32/objects/text.c [iso-8859-1] Mon Aug 24 01:03:55 2009
@@ -395,6 +395,10 @@
res = GetTextFaceW(hdc, 0, NULL);
nameW = HeapAlloc( GetProcessHeap(), 0, res * 2 );
+ if (nameW == NULL)
+ {
+ return 0;
+ }
GetTextFaceW( hdc, res, nameW );
if (name)