From b3ee85fd6da2d1735cea6dbf23b1b13cadf4d86c Mon Sep 17 00:00:00 2001 From: ac-stef Date: Sat, 7 Jun 2014 00:30:50 +0200 Subject: [PATCH] fix failed assertion on making selections in editmode last() may not be used on an empty vector also, the FIXME was obsolete, since addselection() does call correctsel() --- source/src/editing.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/src/editing.cpp b/source/src/editing.cpp index 9e8d35b5..4243a1d9 100644 --- a/source/src/editing.cpp +++ b/source/src/editing.cpp @@ -136,10 +136,10 @@ void checkselections() // update current selection, or add a new one void makesel(bool isnew) { - block &cursel = sels.last(); //RR 10/12/12 - FIXEME, error checking should happen with "isnew", not here checking if it really is new. if(isnew || sels.length() == 0) addselection(min(lastx, cx), min(lasty, cy), abs(lastx-cx)+1, abs(lasty-cy)+1, max(lasth, ch)); else { + block &cursel = sels.last(); cursel.x = min(lastx, cx); cursel.y = min(lasty, cy); cursel.xs = abs(lastx-cx)+1; cursel.ys = abs(lasty-cy)+1; cursel.h = max(lasth, ch);