diff --git a/reactos/win32ss/gdi/ntgdi/icm.c b/reactos/win32ss/gdi/ntgdi/icm.c index 54aa505382b..d06dfc2b5d1 100644 --- a/reactos/win32ss/gdi/ntgdi/icm.c +++ b/reactos/win32ss/gdi/ntgdi/icm.c @@ -23,6 +23,8 @@ IntGdiCreateColorSpace( HCOLORSPACE hCS; pCS = COLORSPACEOBJ_AllocCSWithHandle(); + if (pCS == NULL) return NULL; + hCS = pCS->BaseObject.hHmgr; pCS->lcsColorSpace = pLogColorSpace->lcsColorSpace;