mirror of
https://github.com/isledecomp/isle.git
synced 2025-02-16 19:50:15 -05:00
Match MxBitmap::CreatePalette
This commit is contained in:
parent
a25bcecf47
commit
c507454dd1
1 changed files with 13 additions and 5 deletions
|
@ -250,17 +250,25 @@ MxPalette* MxBitmap::CreatePalette()
|
|||
switch (this->m_isHighColor) {
|
||||
case FALSE:
|
||||
palette = new MxPalette(this->m_paletteData);
|
||||
if (palette)
|
||||
success = TRUE;
|
||||
break;
|
||||
|
||||
if (!palette)
|
||||
goto done;
|
||||
|
||||
break;
|
||||
case TRUE:
|
||||
palette = this->m_palette->Clone();
|
||||
if (palette)
|
||||
success = TRUE;
|
||||
|
||||
if (!palette)
|
||||
goto done;
|
||||
|
||||
break;
|
||||
default:
|
||||
goto done;
|
||||
}
|
||||
|
||||
success = TRUE;
|
||||
|
||||
done:
|
||||
if (!success && palette) {
|
||||
delete palette;
|
||||
palette = NULL;
|
||||
|
|
Loading…
Reference in a new issue