From e661c7da492ce35b15af20aa174a95e5c9e5bb0b Mon Sep 17 00:00:00 2001 From: Steve Daulton Date: Mon, 19 Mar 2018 14:42:06 +0000 Subject: [PATCH] Fix assert on deletion of last macro item --- src/BatchProcessDialog.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/BatchProcessDialog.cpp b/src/BatchProcessDialog.cpp index 03ca67a32..34a41b4d9 100644 --- a/src/BatchProcessDialog.cpp +++ b/src/BatchProcessDialog.cpp @@ -685,7 +685,9 @@ void MacrosWindow::PopulateList() mList->EnsureVisible( (int)mList->GetItemCount() -1 ); mList->EnsureVisible( topItem ); // And then make sure whatever is selected is still visible... - mList->EnsureVisible( mSelectedCommand ); + if (mSelectedCommand >= 0) { + mList->EnsureVisible( mSelectedCommand ); + } } }