Kai Uwe Broulik
2018-12-04 16:05:23 UTC
broulik created this revision.
broulik added reviewers: Dolphin, nicolasfella.
Herald added a project: Baloo.
Herald added a subscriber: Baloo.
broulik requested review of this revision.
REVISION SUMMARY
A `new KFileMetaData::UserMetaData` is only created when a single file is selected.
If more files are selected, we will call `delete` on garbage memory and crash.
Calling `delete` on a `nullptr` is safe.
BUG: 401733
TEST PLAN
- Selected multiple files, opened context menu, closed context menu, no crash
- Selected single file, opened context menu, Tags menu still worked
This feature is only in master, not 18.12, right?
REPOSITORY
R824 Baloo Widgets
REVISION DETAIL
https://phabricator.kde.org/D17348
AFFECTED FILES
src/tagsfileitemactionplugin/tagsfileitemaction.h
To: broulik, #dolphin, nicolasfella
Cc: #baloo, ashaposhnikov, astippich, spoorun, abrahams
broulik added reviewers: Dolphin, nicolasfella.
Herald added a project: Baloo.
Herald added a subscriber: Baloo.
broulik requested review of this revision.
REVISION SUMMARY
A `new KFileMetaData::UserMetaData` is only created when a single file is selected.
If more files are selected, we will call `delete` on garbage memory and crash.
Calling `delete` on a `nullptr` is safe.
BUG: 401733
TEST PLAN
- Selected multiple files, opened context menu, closed context menu, no crash
- Selected single file, opened context menu, Tags menu still worked
This feature is only in master, not 18.12, right?
REPOSITORY
R824 Baloo Widgets
REVISION DETAIL
https://phabricator.kde.org/D17348
AFFECTED FILES
src/tagsfileitemactionplugin/tagsfileitemaction.h
To: broulik, #dolphin, nicolasfella
Cc: #baloo, ashaposhnikov, astippich, spoorun, abrahams