Guard access to kscreen configuration

Review Request #123648 - Created May 5, 2015 and submitted

Information
Sebastian Kügler
plasma-workspace
Plasma/5.3
346590
Reviewers
plasma
Guard access to kscreen configuration

reconsiderOutputs() may be called before the async config fetching
operation (KScreen::GetConfigOperation) has finished, so the pointer is
still null at that point. This can happen if qApp::screenRemoved fires
before kscreen was able to start the backend loader and pass back a
ConfigPtr.

The bug is rooted by in the dual-use of libkscreen and qApp's QScreen
handling. The timings here produce this race condition. This patch
should be quite safe, though, since it doesn't change the logic, but
rather makes sure this race condition bails out nicely by falling back
to just waiting until a kscreen config has arrived (which will happen
right after).

BUG:346590
REVIEW:
FIXED-IN:5.3.1

I can't reproduce this crash myself.

David Edmundson
Aleix Pol Gonzalez
Sebastian Kügler
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit 8e12bd4bdee86fabc3e2985922aae73916cef700 by Sebastian Kügler to branch Plasma/5.3.
Loading...