Fix #12478: Crash in track_block_get_next()

This commit is contained in:
Michael Steenbeek authored and GitHub committed 2020-07-26 17:16:27 +02:00
1 parent 9db2aac3bf
commit ba10b84789
1 file changed
+3
+3
View File
@@ -555,6 +555,9 @@ bool track_block_get_next_from_zero(
*/
bool track_block_get_next(CoordsXYE* input, CoordsXYE* output, int32_t* z, int32_t* direction)
{
if (input == nullptr || input->element == nullptr)
return false;
auto inputElement = input->element->AsTrack();
if (inputElement == nullptr)
return false;