From 5653bd2416bae7fe009c76de05859abdd4bed37a Mon Sep 17 00:00:00 2001 From: Jinhao Date: Wed, 13 Dec 2017 06:28:12 +0800 Subject: [PATCH] fix crash where listbox::item_proxy==str --- source/gui/widgets/listbox.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/gui/widgets/listbox.cpp b/source/gui/widgets/listbox.cpp index e473a080..54611aa1 100644 --- a/source/gui/widgets/listbox.cpp +++ b/source/gui/widgets/listbox.cpp @@ -4662,12 +4662,12 @@ namespace nana bool item_proxy::operator==(const std::string& s) const { - return (text(pos_.item) == s); + return (text(0) == s); } bool item_proxy::operator==(const std::wstring& s) const { - return (text(pos_.item) == to_utf8(s)); + return (text(0) == to_utf8(s)); } item_proxy & item_proxy::operator=(const item_proxy& rhs)