Discussion:
D17348: Initialize m_metaData
Kai Uwe Broulik
2018-12-04 16:05:23 UTC
Permalink
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
Kai Uwe Broulik
2018-12-04 16:05:46 UTC
Permalink
broulik edited the summary of this revision.

REPOSITORY
R824 Baloo Widgets

REVISION DETAIL
https://phabricator.kde.org/D17348

To: broulik, #dolphin, nicolasfella
Cc: #baloo, ashaposhnikov, astippich, spoorun, abrahams
Elvis Angelaccio
2018-12-04 21:22:29 UTC
Permalink
elvisangelaccio accepted this revision.
elvisangelaccio added a comment.
This revision is now accepted and ready to land.


Ops, I just submitted D17363 <https://phabricator.kde.org/D17363>, but this fix is indeed better.

REPOSITORY
R824 Baloo Widgets

REVISION DETAIL
https://phabricator.kde.org/D17348

To: broulik, #dolphin, nicolasfella, elvisangelaccio
Cc: elvisangelaccio, #baloo, ashaposhnikov, astippich, spoorun, abrahams
Elvis Angelaccio
2018-12-04 21:23:07 UTC
Permalink
elvisangelaccio added a comment.


And yes, this happens only in master, not 18.12

REPOSITORY
R824 Baloo Widgets

REVISION DETAIL
https://phabricator.kde.org/D17348

To: broulik, #dolphin, nicolasfella, elvisangelaccio
Cc: elvisangelaccio, #baloo, ashaposhnikov, astippich, spoorun, abrahams
Loading...