summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-09-30 16:53:32 (GMT)
committerSwift Review <review@swift.im>2015-10-13 13:43:24 (GMT)
commit39f291afd3cab9d6c1e7cdf7f0f5476ef6747abd (patch)
treec711cf842aecaec2d1f2d740f096df7d47fac335 /Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
parentd8946ea19cfc37df6660cebc516e86a93204def0 (diff)
downloadswift-39f291afd3cab9d6c1e7cdf7f0f5476ef6747abd.zip
swift-39f291afd3cab9d6c1e7cdf7f0f5476ef6747abd.tar.bz2
Fix crash in user search dialog for invitation use case
Commit 9b48a73 introduced a bug because it always assumed the 'Add contact' user case. Test-Information: Retested the add contact case described in commit 9b48a73 and tested MUC invitation by DND. Neither crashes anymore. Change-Id: Ifab356e6ad9a52365ed15dd46e4e94492bdc60bf
Diffstat (limited to 'Swift/QtUI/UserSearch/QtUserSearchWindow.cpp')
-rw-r--r--Swift/QtUI/UserSearch/QtUserSearchWindow.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
index 013b869..bb6fc31 100644
--- a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
+++ b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
@@ -304,7 +304,9 @@ void QtUserSearchWindow::handleOnSearchedJIDSelected(const Contact::ref& contact
void QtUserSearchWindow::show() {
clear();
- setWarning(boost::optional<std::string>());
+ if (type_ == AddContact) {
+ setWarning(boost::optional<std::string>());
+ }
QWidget::show();
}