Install the colormap only if it was created.

This commit is contained in:
Lionel Ulmer 2000-05-30 20:05:05 +00:00 committed by Alexandre Julliard
parent 984f3d9637
commit 0761f537ee

View File

@ -312,8 +312,9 @@ HRESULT WINAPI Xlib_IDirectDrawSurface4Impl_SetPalette(
if( This->s.palette != NULL )
IDirectDrawPalette_Release( (IDirectDrawPalette*)This->s.palette );
This->s.palette = ipal;
/* Perform the refresh */
TSXSetWindowColormap(display,ddpriv->drawable,dppriv->cm);
/* Perform the refresh, only if a palette was created */
if (dppriv->cm)
TSXSetWindowColormap(display,ddpriv->drawable,dppriv->cm);
if (This->s.hdc != 0) {
/* hack: set the DIBsection color map */