Folderman: Check if socketApi member is non zero, no crashes.

This commit is contained in:
Klaas Freitag 2014-09-30 12:33:51 +02:00
parent 06c48f58cc
commit 479b340d75

View file

@ -452,7 +452,9 @@ void FolderMan::slotScheduleSync( const QString& alias )
f->prepareToSync(); f->prepareToSync();
} else { } else {
qDebug() << "Folder is not enabled, not scheduled!"; qDebug() << "Folder is not enabled, not scheduled!";
if( _socketApi ) {
_socketApi->slotUpdateFolderView(f->alias()); _socketApi->slotUpdateFolderView(f->alias());
}
return; return;
} }
_scheduleQueue.enqueue(alias); _scheduleQueue.enqueue(alias);
@ -514,10 +516,12 @@ void FolderMan::slotStartScheduledFolderSync()
// reread the excludes of the socket api // reread the excludes of the socket api
// FIXME: the excludes need rework. // FIXME: the excludes need rework.
if( _socketApi ) {
_socketApi->slotClearExcludesList(); _socketApi->slotClearExcludesList();
_socketApi->slotReadExcludes(); _socketApi->slotReadExcludes();
} }
} }
}
} }
void FolderMan::slotFolderSyncStarted( ) void FolderMan::slotFolderSyncStarted( )