Test if conditions in ImportColorsToPalette

This commit is contained in:
Joshua Peisach 2023-10-03 12:08:36 -04:00 committed by GitHub
parent 6480fd90e7
commit cc32fc0e5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,11 +110,11 @@ MxResult MxBitmap::ImportColorsToPalette(RGBQUAD* p_rgbquad, MxPalette* p_palett
PALETTEENTRY entries[256];
if (p_palette) {
if (p_palette->GetEntries(entries))
if (!p_palette->GetEntries(entries))
return ret;
} else {
MxPalette local_pal;
if (local_pal.GetEntries(entries))
if (!local_pal.GetEntries(entries))
return ret;
}