diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2011-03-02 17:58:49 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2011-03-02 18:00:41 +0100 |
commit | d6fc82906b5724d8c5f4b782ad850e4462e56af2 (patch) | |
tree | d57b0fe1c47248716d3cc23e022ca61a3b4474fa | |
parent | delete bookmarkProvider sooner to prevent segfault (diff) | |
download | rekonq-d6fc82906b5724d8c5f4b782ad850e4462e56af2.tar.xz |
Prevent crashes on history models updating...
BUG:263326
-rw-r--r-- | src/history/historymodels.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/history/historymodels.cpp b/src/history/historymodels.cpp index bfd202f3..2cab8efb 100644 --- a/src/history/historymodels.cpp +++ b/src/history/historymodels.cpp @@ -354,10 +354,18 @@ void HistoryFilterModel::load() const void HistoryFilterModel::sourceRowsInserted(const QModelIndex &parent, int start, int end) { - Q_ASSERT(start == end && start == 0); + //Q_ASSERT(start == end && start == 0); Q_UNUSED(end); + + if(start != 0) + { + kDebug() << "STARTING from a NON zero position..."; + return; + } + if (!m_loaded) return; + QModelIndex idx = sourceModel()->index(start, 0, parent); QString url = idx.data(HistoryModel::UrlStringRole).toString(); if (m_historyHash.contains(url)) |