1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-30 18:25:16 +01:00

Fix #5377: Saved game keeps crashing shortly after loading

Guard against null pointers in banner_paint() (#5379)
This commit is contained in:
Richard Jenkins
2017-04-17 18:37:37 +01:00
committed by Ted John
parent 34540b6439
commit 8f59b04d32
2 changed files with 5 additions and 0 deletions

View File

@@ -76,6 +76,7 @@ Includes all git commit authors. Aliases are GitHub user names.
* Jonathan Haas (HaasJona)
* Jake Breen (Haekb)
* Marco Benzi Tobar (Lisergishnu)
* Richard Jenkins (rwjuk)
## Toolchain
* (Balletie) - macOS

View File

@@ -48,6 +48,10 @@ void banner_paint(uint8 direction, sint32 height, rct_map_element* map_element)
rct_scenery_entry* banner_scenery = get_banner_entry(gBanners[map_element->properties.banner.index].type);
if ((banner_scenery == (rct_scenery_entry *)-1) || (banner_scenery == NULL)) {
return;
}
direction += map_element->properties.banner.position;
direction &= 3;