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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user