Fix #11128: null tile element in track_block_get_previous (#11144)

This commit is contained in:
Michał Janiszewski 2020-03-29 23:01:13 +02:00 committed by GitHub
parent 87b90f2304
commit d1faa228c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -656,6 +656,9 @@ bool track_block_get_previous_from_zero(
*/
bool track_block_get_previous(int32_t x, int32_t y, TileElement* tileElement, track_begin_end* outTrackBeginEnd)
{
if (tileElement == nullptr)
return false;
auto trackElement = tileElement->AsTrack();
if (trackElement == nullptr)
return false;