1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Validate water image id while loading palette

This commit is contained in:
Michał Janiszewski
2017-04-24 22:56:37 +02:00
parent ee7ad17a30
commit 73efe0755d

View File

@@ -15,6 +15,7 @@
#pragma endregion
#include "../common.h"
#include "../core/Guard.hpp"
#include "../interface/window.h"
#include "../localisation/localisation.h"
#include "../object.h"
@@ -518,7 +519,8 @@ void load_palette(){
uint32 palette = 0x5FC;
if ((intptr_t)water_type != -1){
if ((intptr_t)water_type != -1) {
openrct2_assert(water_type->image_id != (uint32)-1, "Failed to load water palette");
palette = water_type->image_id;
}