Author: tkreuzer
Date: Thu Feb 5 09:35:54 2015
New Revision: 66171
URL:
http://svn.reactos.org/svn/reactos?rev=66171&view=rev
Log:
[GDI32]
CORE-8350 #comment Fix return value on error in RealizePalette. #resolve
Modified:
trunk/reactos/win32ss/gdi/gdi32/objects/palette.c
Modified: trunk/reactos/win32ss/gdi/gdi32/objects/palette.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/gdi32/objects/…
==============================================================================
--- trunk/reactos/win32ss/gdi/gdi32/objects/palette.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/gdi32/objects/palette.c [iso-8859-1] Thu Feb 5 09:35:54
2015
@@ -139,6 +139,12 @@
_In_ HDC hdc) /* [in] Handle of device context */
{
HANDLE_METADC0P(UINT, RealizePalette, GDI_ERROR, hdc);
+
+ if (GDI_HANDLE_GET_TYPE(hdc) != GDILoObjType_LO_DC_TYPE)
+ {
+ return GDI_ERROR;
+ }
+
return UserRealizePalette(hdc);
}