mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-06 03:39:51 +00:00
Add an extra debug check in Editor::play/stop() functions
There are crashes in Editor::stop(). These asserts were added just to see if we can catch them.
This commit is contained in:
parent
f9eb87f6b1
commit
71efdfdf76
@ -1563,12 +1563,20 @@ void Editor::notifyScrollChanged()
|
||||
|
||||
void Editor::play()
|
||||
{
|
||||
ASSERT(m_state);
|
||||
if (!m_state)
|
||||
return;
|
||||
|
||||
if (!dynamic_cast<PlayState*>(m_state.get()))
|
||||
setState(EditorStatePtr(new PlayState));
|
||||
}
|
||||
|
||||
void Editor::stop()
|
||||
{
|
||||
ASSERT(m_state);
|
||||
if (!m_state)
|
||||
return;
|
||||
|
||||
if (dynamic_cast<PlayState*>(m_state.get()))
|
||||
backToPreviousState();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user