[Pkg-owncloud-commits] [owncloud-client] 88/115: Fix crash in accountsettings

Sandro Knauß hefee-guest at moszumanska.debian.org
Fri Aug 29 22:04:04 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 8fdee7950531edd8c452f7c0dc4e689dd0446cbe
Author: Daniel Molkentin <danimo at owncloud.com>
Date:   Wed Aug 20 16:06:16 2014 +0200

    Fix crash in accountsettings
---
 src/mirall/accountsettings.cpp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/mirall/accountsettings.cpp b/src/mirall/accountsettings.cpp
index 9f8b84f..2bdafd6 100644
--- a/src/mirall/accountsettings.cpp
+++ b/src/mirall/accountsettings.cpp
@@ -235,7 +235,11 @@ void AccountSettings::slotAddFolder( Folder *folder )
     if( ! folder || folder->alias().isEmpty() ) return;
 
     QStandardItem *item = new QStandardItem();
-    folderToModelItem( item, folder, _account->state() == Account::Connected );
+    bool isConnected = false;
+    if (_account) {
+        isConnected = (_account->state() == Account::Connected);
+    }
+    folderToModelItem( item, folder,  isConnected);
     _model->appendRow( item );
     // in order to update the enabled state of the "Sync now" button
     connect(folder, SIGNAL(syncStateChange()), this, SLOT(slotFolderSyncStateChange()), Qt::UniqueConnection);
@@ -273,7 +277,7 @@ void AccountSettings::folderToModelItem( QStandardItem *item, Folder *f, bool ac
 
     Theme *theme = Theme::instance();
     item->setData( theme->statusHeaderText( status ),  Qt::ToolTipRole );
-    if (_account->state() == Account::Connected) {
+    if ( accountConnected ) {
         if( f->syncPaused() ) {
             item->setData( theme->folderDisabledIcon( ), FolderStatusDelegate::FolderStatusIconRole ); // size 48 before
             _wasDisabledBefore = false;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list