summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
authorRichard Maudsley <richard.maudsley@isode.com>2014-04-08 11:48:39 (GMT)
committerSwift Review <review@swift.im>2014-04-22 15:49:37 (GMT)
commit4444aeb255f8d1712b794c31166f362bb3ec335a (patch)
tree484c984412ff889b6d172fed7c77efe5bd63f399 /Swift
parent130c36694a33959ef7da64e86c64e2d4dbc32fff (diff)
downloadswift-contrib-4444aeb255f8d1712b794c31166f362bb3ec335a.zip
swift-contrib-4444aeb255f8d1712b794c31166f362bb3ec335a.tar.bz2
Fix for crash when resetting New Chat wizard.
Change-Id: I6ae355e4ecc45923ddf62c8c972e9771338d8583
Diffstat (limited to 'Swift')
-rw-r--r--Swift/QtUI/UserSearch/QtUserSearchWindow.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
index 72c2964..ed0fae2 100644
--- a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
+++ b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
@@ -34,7 +34,7 @@
namespace Swift {
-QtUserSearchWindow::QtUserSearchWindow(UIEventStream* eventStream, UserSearchWindow::Type type, const std::set<std::string>& groups, SettingsProvider* settingsProvider) : eventStream_(eventStream), type_(type), model_(NULL), settings_(settingsProvider), searchNext_(false), supportsImpromptu_(false) {
+QtUserSearchWindow::QtUserSearchWindow(UIEventStream* eventStream, UserSearchWindow::Type type, const std::set<std::string>& groups, SettingsProvider* settingsProvider) : eventStream_(eventStream), type_(type), model_(NULL), firstMultiJIDPage_(NULL), settings_(settingsProvider), searchNext_(false), supportsImpromptu_(false) {
setupUi(this);
#ifndef Q_OS_MAC
setWindowIcon(QIcon(":/logo-icon-16.png"));
@@ -73,7 +73,9 @@ QtUserSearchWindow::~QtUserSearchWindow() {
void QtUserSearchWindow::handleCurrentChanged(int page) {
searchNext_ = false;
- firstMultiJIDPage_->reset();
+ if (firstMultiJIDPage_) {
+ firstMultiJIDPage_->reset();
+ }
resultsPage_->emitCompletenessCheck();
if (page == 1 && lastPage_ == 3) {
addSearchedJIDToList(getContactJID());