Check if in depth-conversion mode before returning an error message

in IDirectDrawPaletteImpl_GetEntries.
oldstable
Lionel Ulmer 1999-05-14 08:07:56 +00:00 committed by Alexandre Julliard
parent ad7258517e
commit 3899c021a1
1 changed files with 4 additions and 1 deletions

View File

@ -2013,7 +2013,10 @@ static HRESULT WINAPI IDirectDrawPaletteImpl_GetEntries(
TRACE(ddraw,"(%p)->GetEntries(%08lx,%ld,%ld,%p)\n",
This,x,start,count,palent);
if (!This->cm) /* should not happen */ {
/* No palette created and not in depth-convertion mode -> BUG ! */
if ((This->cm == NULL) &&
(This->ddraw->d.palette_convert == NULL))
{
FIXME(ddraw,"app tried to read colormap for non-palettized mode\n");
return DDERR_GENERIC;
}