diff --git a/src/emu/crsshair.c b/src/emu/crsshair.c index ccda97d9b54..6c674059ee0 100644 --- a/src/emu/crsshair.c +++ b/src/emu/crsshair.c @@ -155,8 +155,7 @@ static void create_bitmap(running_machine *machine, int player) rgb_t color = crosshair_colors[player]; /* if we have a bitmap for this player, kill it */ - if (global.bitmap[player] != NULL) - bitmap_free(global.bitmap[player]); + global_free(global.bitmap[player]); if (global.name[player][0] != 0) { @@ -268,8 +267,7 @@ static void crosshair_exit(running_machine *machine) render_texture_free(global.texture[player]); global.texture[player] = NULL; - if (global.bitmap[player] != NULL) - bitmap_free(global.bitmap[player]); + global_free(global.bitmap[player]); global.bitmap[player] = NULL; } } diff --git a/src/emu/rendlay.c b/src/emu/rendlay.c index d1055df8628..5fda2726c65 100644 --- a/src/emu/rendlay.c +++ b/src/emu/rendlay.c @@ -1881,7 +1881,7 @@ static bitmap_t *load_component_bitmap(const char *dirname, const char *file, co /* load the alpha bitmap if specified */ if (render_load_png(OPTION_ARTPATH, dirname, alphafile, bitmap, hasalpha) == NULL) { - bitmap_free(bitmap); + global_free(bitmap); bitmap = NULL; } diff --git a/src/osd/sdl/video.c b/src/osd/sdl/video.c index 641dc460203..4a4a9c4f616 100644 --- a/src/osd/sdl/video.c +++ b/src/osd/sdl/video.c @@ -153,8 +153,7 @@ error: static void video_exit(running_machine *machine) { // free the overlay effect - if (effect_bitmap != NULL) - bitmap_free(effect_bitmap); + global_free(effect_bitmap); effect_bitmap = NULL; // free all of our monitor information diff --git a/src/osd/windows/drawd3d.c b/src/osd/windows/drawd3d.c index b78bdb4c9ab..743b84794df 100644 --- a/src/osd/windows/drawd3d.c +++ b/src/osd/windows/drawd3d.c @@ -578,8 +578,7 @@ static void drawd3d_window_destroy(win_window_info *window) device_delete(d3d); // experimental: free the vector PNG - if (d3d->vector_bitmap != NULL) - bitmap_free(d3d->vector_bitmap); + global_free(d3d->vector_bitmap); // free the memory in the window global_free(d3d); diff --git a/src/osd/windows/video.c b/src/osd/windows/video.c index 49c6780c73e..5f1388d2245 100644 --- a/src/osd/windows/video.c +++ b/src/osd/windows/video.c @@ -149,8 +149,7 @@ void winvideo_init(running_machine *machine) static void winvideo_exit(running_machine *machine) { // free the overlay effect - if (effect_bitmap != NULL) - bitmap_free(effect_bitmap); + global_free(effect_bitmap); effect_bitmap = NULL; // free all of our monitor information