Don't crash if the fwupd error is null
ClosedPublic

Authored by leinir on Wed, Mar 6, 10:49 AM.

Details

Summary

I got a difficult-to-reproduce crash, which pointed at the fact that this error can, at times, be null. Without the validity check this patch introduces, we then attempted to deref that null pointer, and crashed.

Diff Detail

Repository
R134 Discover Software Store
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
leinir created this revision.Wed, Mar 6, 10:49 AM
Restricted Application added a project: Plasma. · View Herald TranscriptWed, Mar 6, 10:49 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
leinir requested review of this revision.Wed, Mar 6, 10:49 AM
ngraham accepted this revision.Wed, Mar 6, 2:15 PM
This revision is now accepted and ready to land.Wed, Mar 6, 2:15 PM
apol accepted this revision.Wed, Mar 6, 3:01 PM

Cool, thanks! remember to land in 5.15.

leinir added a comment.Wed, Mar 6, 3:01 PM
In D19561#425879, @apol wrote:

Cool, thanks! remember to land in 5.15.

Will do! :)

This revision was automatically updated to reflect the committed changes.