mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 01:24:38 +00:00
Changes in COLOR_PaletteLookupPixel() to handel case, when it's called with NULL XlateObj,
svn path=/trunk/; revision=6131
This commit is contained in:
parent
fc32b5f1f9
commit
30174c1155
1 changed files with 6 additions and 2 deletions
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: color.c,v 1.24 2003/09/10 21:03:18 fireball Exp $ */
|
||||
/* $Id: color.c,v 1.25 2003/09/25 15:12:42 fireball Exp $ */
|
||||
|
||||
// FIXME: Use PXLATEOBJ logicalToSystem instead of int *mapping
|
||||
|
||||
|
@ -565,7 +565,11 @@ INT STDCALL COLOR_PaletteLookupPixel(PALETTEENTRY *palPalEntry, INT size,
|
|||
|
||||
if( r < diff ) { best = i; diff = r; }
|
||||
}
|
||||
return (XlateObj->pulXlate) ? (INT)XlateObj->pulXlate[best] : best;
|
||||
|
||||
if (XlateObj == NULL)
|
||||
return best;
|
||||
else
|
||||
return (XlateObj->pulXlate) ? (INT)XlateObj->pulXlate[best] : best;
|
||||
}
|
||||
|
||||
COLORREF STDCALL COLOR_LookupNearestColor( PALETTEENTRY* palPalEntry, int size, COLORREF color )
|
||||
|
|
Loading…
Reference in a new issue