From c3747c63d9f269eb5122c9f60b3b7abd866fc877 Mon Sep 17 00:00:00 2001 From: Barinade Date: Thu, 4 Nov 2021 20:31:51 -0500 Subject: [PATCH] prevent crash on notefield preview when no steps exists --- src/Etterna/Actor/Gameplay/ArrowEffects.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Etterna/Actor/Gameplay/ArrowEffects.cpp b/src/Etterna/Actor/Gameplay/ArrowEffects.cpp index a20df35ff4..d0e7c72501 100644 --- a/src/Etterna/Actor/Gameplay/ArrowEffects.cpp +++ b/src/Etterna/Actor/Gameplay/ArrowEffects.cpp @@ -341,6 +341,8 @@ ArrowEffects::GetYOffset(const PlayerState* pPlayerState, const auto fSongBeat = position.m_fSongBeatVisible; Steps* pCurSteps = GAMESTATE->m_pCurSteps; + if (pCurSteps == nullptr) + return 0.F; /* Usually, fTimeSpacing is 0 or 1, in which case we use entirely beat * spacing or entirely time spacing (respectively). Occasionally, we tween