From 0d37b5453d886cb6015bb1f538a99b8116734bb8 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Thu, 5 Dec 2013 09:17:03 +0200 Subject: Git: Fix soft assertion First selectionChanged when dialog is opened always has empty index for previous. Change-Id: I024374f9e61fffae351f15af54f769ddf84ded75 Reviewed-by: Petar Perisin --- src/plugins/git/logchangedialog.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/plugins/git/logchangedialog.cpp') diff --git a/src/plugins/git/logchangedialog.cpp b/src/plugins/git/logchangedialog.cpp index 6a316765b1..a52e1b7e9f 100644 --- a/src/plugins/git/logchangedialog.cpp +++ b/src/plugins/git/logchangedialog.cpp @@ -130,7 +130,8 @@ void LogChangeWidget::selectionChanged(const QItemSelection &selected, if (!m_hasCustomDelegate) return; const QModelIndexList previousIndexes = deselected.indexes(); - QTC_ASSERT(!previousIndexes.isEmpty(), return); + if (previousIndexes.isEmpty()) + return; const QModelIndex current = currentIndex(); int row = current.row(); int previousRow = previousIndexes.first().row(); -- cgit v1.2.1