Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2017-03-16 16:25:08 +0300
committerMarkus Goetz <markus@woboq.com>2017-03-16 16:31:15 +0300
commita60370255e31708bf85d8cf36e917980c51a36f6 (patch)
treeb17036bd7969573e55ddd73a78a0b03972308f2b
parent21909cae04a89d4499f6771284f386746d4b0cd5 (diff)
ActivityListModel: attempt to fix a crash.
The backtrace seems to indicate that the account is invalid. I don't know how this can happen, maybe the account's display name was changed while the app is running? Backtrace: Crash: EXC_BAD_ACCESS / KERN_INVALID_ADDRESS at 0x18 Module "owncloud", in OCC::AccountState::account Module "owncloud", in OCC::ActivityListModel::data Module "owncloud", in OCC::ActivityItemDelegate::paint Module "QtWidgets", in QListView::paintEvent Module "QtWidgets", in QWidget::event Module "QtWidgets", in QFrame::event Module "QtWidgets", in QAbstractScrollArea::viewportEvent Module "QtWidgets", in QAbstractItemView::viewportEvent Module "QtWidgets", in QAbstractScrollAreaFilter::eventFilter Module "QtCore", in QCoreApplicationPrivate::sendThroughObjectEventFilters
-rw-r--r--src/gui/activitylistmodel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/activitylistmodel.cpp b/src/gui/activitylistmodel.cpp
index f6658db00..b4d213c85 100644
--- a/src/gui/activitylistmodel.cpp
+++ b/src/gui/activitylistmodel.cpp
@@ -47,6 +47,8 @@ QVariant ActivityListModel::data(const QModelIndex &index, int role) const
a = _finalList.at(index.row());
AccountStatePtr ast = AccountManager::instance()->account(a._accName);
+ if (!ast)
+ return QVariant();
QStringList list;
switch (role) {