Skip to content

fix(gui): prevent nullptr dereference when VFS mode is unavailable#10176

Open
troed wants to merge 1 commit into
nextcloud:masterfrom
troed:nullptr
Open

fix(gui): prevent nullptr dereference when VFS mode is unavailable#10176
troed wants to merge 1 commit into
nextcloud:masterfrom
troed:nullptr

Conversation

@troed

@troed troed commented Jun 12, 2026

Copy link
Copy Markdown

The switch statement on Vfs::Mode lacked a default case. When no VFS mode is available, msgBox remains nullptr and msgBox->open() causes a segfault. Added a default case that calls callback(false) and returns early.

Assisted-by: Qwen:qwen-3.6-35b-a3b

Resolves

#10174

Summary

OpenSUSE Tumbleweed has a separate package for VFS. If the user tries to enable VFS without it the previous code dereferenced a null pointer and segfaulted. This fix solves the crash and the user just sees that enabling VFS doesn't "stick". I opted against adding a dialog explaining why to not increase translation work for what I expect to believe an edge case.

TODO

Checklist

AI (if applicable)

… askExperimentalVirtualFilesFeature

The switch statement on Vfs::Mode lacked a default case. When an
unexpected VFS mode is returned, msgBox remains nullptr and
msgBox->open() causes a segfault. Added a default case that
calls callback(false) and returns early.

Assisted-by: Qwen:qwen-3.6-35b-a3b
Signed-off-by: Troed Sångberg <github@troed.se>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants