diff --git a/src/app/ui/editor/moving_cel_state.cpp b/src/app/ui/editor/moving_cel_state.cpp index b9b0bd2ef..9b0eaa38c 100644 --- a/src/app/ui/editor/moving_cel_state.cpp +++ b/src/app/ui/editor/moving_cel_state.cpp @@ -40,6 +40,7 @@ MovingCelState::MovingCelState(Editor* editor, MouseMessage* msg) ASSERT(layer->isImage()); m_cel = layer->cel(editor->frame()); + ASSERT(m_cel); // The cel cannot be null if (m_cel) { m_celStart = m_cel->position(); } diff --git a/src/app/ui/editor/standby_state.cpp b/src/app/ui/editor/standby_state.cpp index 2a191e7c4..28dab32aa 100644 --- a/src/app/ui/editor/standby_state.cpp +++ b/src/app/ui/editor/standby_state.cpp @@ -189,6 +189,10 @@ bool StandbyState::onMouseDown(Editor* editor, MouseMessage* msg) StatusBar::instance()->showTip(1000, "Layer '%s' is locked", layer->name().c_str()); } + else if (!layer->cel(editor->frame())) { + StatusBar::instance()->showTip(1000, + "Cel is empty, nothing to move"); + } else { // Change to MovingCelState editor->setState(EditorStatePtr(new MovingCelState(editor, msg)));