Fix UI gfx viewer crash with no palette (nw)

This commit is contained in:
Alex W. Jackson 2014-03-12 06:10:35 +00:00
parent 1a4931f507
commit 601b9c4bed
2 changed files with 2 additions and 2 deletions

View File

@ -909,7 +909,7 @@ static void gfxset_draw_item(running_machine &machine, gfx_element *gfx, int ind
};
int width = (rotate & ORIENTATION_SWAP_XY) ? gfx->height() : gfx->width();
int height = (rotate & ORIENTATION_SWAP_XY) ? gfx->width() : gfx->height();
const rgb_t *palette = (machine.first_screen()->palette()->entries() != 0) ? machine.first_screen()->palette()->palette()->entry_list_raw() : NULL;
const rgb_t *palette = (machine.first_screen()->palette() != NULL) ? machine.first_screen()->palette()->palette()->entry_list_raw() : NULL;
UINT32 palette_mask = ~0;
int x, y;

View File

@ -1732,7 +1732,7 @@ READ16_MEMBER( sega_segacd_device::segacd_font_converted_r )
void sega_segacd_device::device_start()
{
if (m_gfxdecode != NULL && !m_gfxdecode->started())
if (!m_gfxdecode->started())
throw device_missing_dependencies();
segacd_gfx_conversion_timer = machine().device<timer_device>(":segacd:stamp_timer");