Skip to content

Fix accessing dangling pointer JobPrivate::m_slave on cleanup

Felix Ernst requested to merge (removed):fixdangling into master

Changes done in system/dolphin!158 (merged) made the dolphinmainwindowtest reproducably crash on cleanup (@see system/dolphin!158 (comment 169195) or check the error report of the pipeline).

This MR prevents accessing m_slave as a dangling pointer in SchedulerPrivate::cancelJob() when that method tries to clean up m_slave (which possibly already happened). This is done by saving m_slave as a QPointer in the first place.

I am not totally sure if this is the right way to fix it because I didn't take the time to analyse the destruction steps that lead to this but simply using QPointer doesn't seem like a bad idea anyway.

Merge request reports