Fix crash in KAStatsFavouritesModel
ClosedPublic

Authored by davidedmundson on Nov 1 2017, 11:39 PM.

Details

Summary

KAStatsFavouritesModel doesn't initialise a D-pointer for the lifespan
of the KAStatsFavouritesModel, like the name implies.

It is set in initForClient.

If the activity changes before we have a client ID, there's no point
doing anything and trying to use the clientID will crash.

BUG: 386439

Test Plan

None.

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Nov 1 2017, 11:39 PM
Restricted Application added a project: Plasma. · View Herald TranscriptNov 1 2017, 11:39 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
anthonyfieroni added inline comments.
applets/kicker/plugin/kastatsfavoritesmodel.cpp
506

d && d->trigger ?

625

addFavorite has a check, so here it should.

641

dito

662

dito

davidedmundson marked 4 inline comments as done.

Update

hein accepted this revision.Nov 9 2017, 12:34 PM
This revision is now accepted and ready to land.Nov 9 2017, 12:34 PM
This revision was automatically updated to reflect the committed changes.