Skip to content
Snippets Groups Projects
Commit 2ef4ec75 authored by Adam Mokhtari's avatar Adam Mokhtari
Browse files

Fixed EditorViewport crash on keypresses

Before, EditorViewport would start accessing arrays on keypresses (specifically
the arrow keys) even when there were no editors.  This adds an extra check to
prevent this.
parent 0f0bedd4
Branches
No related tags found
No related merge requests found
......@@ -522,7 +522,7 @@ bool EditorViewport::keyPressed (const KeyPress &key) {
//std::cout << "Editor viewport received " << key.getKeyCode() << std::endl;
if (canEdit)
if (canEdit && editorArray.size() > 0)
{
ModifierKeys mk = key.getModifiers();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment