From 63eae802a1a70b99f693cd1622e0017a0e7756dd Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Sat, 19 Aug 2023 19:06:36 +0800 Subject: [PATCH] [gnc-tree-container.hpp] bugfix in operator== when comparing two GncTreeIter, if they both were end() iterators from differing GtkTreeModels they would have been deemed equal. Amend so that operator== returns false. --- gnucash/gnome-utils/gnc-tree-container.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gnucash/gnome-utils/gnc-tree-container.hpp b/gnucash/gnome-utils/gnc-tree-container.hpp index 433833ff10..1aa2f37ce5 100644 --- a/gnucash/gnome-utils/gnc-tree-container.hpp +++ b/gnucash/gnome-utils/gnc-tree-container.hpp @@ -102,6 +102,8 @@ public: bool operator==(const GncTreeIter& other) const { + if (m_model != other.m_model) + return false; if (!m_iter.has_value() && !other.m_iter.has_value()) return true; if (!m_iter.has_value() || !other.m_iter.has_value())