From 6db808ec606c605008393a13f7fc8be7ea2e4855 Mon Sep 17 00:00:00 2001 From: in1tiate <32779090+in1tiate@users.noreply.github.com> Date: Sat, 21 Mar 2020 18:03:12 -0500 Subject: [PATCH] If frame count is 0, don't try to play the next frame (#129) ya goofus. --- src/aocharmovie.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/aocharmovie.cpp b/src/aocharmovie.cpp index dfd5355..efa5e8c 100644 --- a/src/aocharmovie.cpp +++ b/src/aocharmovie.cpp @@ -53,7 +53,10 @@ void AOCharMovie::play(QString p_char, QString p_emote, QString emote_prefix) this->LoadImageWithStupidMethodForFlipSupport(m_movie->currentImage()); this->show(); this->play_frame_sfx(); - ticker->start(m_movie->nextFrameDelay()); + // if the frame count is 0 (i.e. it's a static PNG) don't try to play the next frame, ya goofus + if (m_movie->frameCount() != 0) { + ticker->start(m_movie->nextFrameDelay()); + } } void AOCharMovie::play_frame_sfx()