diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index bdaab13b378..6cfe4825c11 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -151,7 +151,7 @@ DC *alloc_dc_ptr( const DC_FUNCTIONS *funcs, WORD magic ) if (!(dc->hSelf = alloc_gdi_handle( &dc->header, magic, &dc_funcs ))) { HeapFree( GetProcessHeap(), 0, dc ); - dc = NULL; + return NULL; } dc->nulldrv.hdc = dc->hSelf; return dc;