Skip to content

Commit

Permalink
Fix possible crash if the client encountered an error during folder s…
Browse files Browse the repository at this point in the history
…etup

In that case the engne would return a nullptr.
  • Loading branch information
TheOneRing committed May 27, 2024
1 parent 4193db6 commit 0727e2a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions changelog/unreleased/11664
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Fix crash for folders that could not be initialized

We fixed a bug where interacting with a folder in the file browser could lead to a crash if the folder was not properly initialized.

https://github.com/owncloud/client/pull/11664
3 changes: 2 additions & 1 deletion src/gui/socketapi/socketapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -952,8 +952,9 @@ bool OCC::SocketApi::FileData::isSyncFolder() const

SyncFileStatus SocketApi::FileData::syncFileStatus() const
{
if (!folder)
if (!folder || folder->canSync()) {
return SyncFileStatus::StatusNone;
}
return folder->syncEngine().syncFileStatusTracker().fileStatus(folderRelativePath);
}

Expand Down

0 comments on commit 0727e2a

Please sign in to comment.