Guard access to kscreen configuration
Review Request #123648 - Created May 5, 2015 and submitted
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.