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

This commit is contained in:
Michał Janiszewski authored and GitHub committed 2020-03-29 22:01:13 +01:00
1 parent 87b90f2304
commit d1faa228c5
1 file changed
+3
+3
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;