From 87e166812794559b13741c70e1de5d3280a3ff17 Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Sat, 13 Dec 2014 13:54:38 +0100 Subject: Don't allow "move right" in Automatizer when there's nowhere to move --- src/squelch/cursor.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/squelch') diff --git a/src/squelch/cursor.cc b/src/squelch/cursor.cc index db2f416d..3a3bec46 100644 --- a/src/squelch/cursor.cc +++ b/src/squelch/cursor.cc @@ -32,6 +32,9 @@ Condition *Cursor::current() void Cursor::move_right() { + if (m_conditions.empty()) { + return; + } // Go right if the currently selected condition has children. std::shared_ptr c = current()->first_child(); if (c) -- cgit v1.2.3