[mythtv-commits] [MythTV/mythtv] f9baf0: Crash of backend on delete of program being recorded
noreply at github.com
Thu May 21 19:06:41 UTC 2020
Author: Klaas de Waal <kdewaal at mythtv.org>
Date: 2020-05-21 (Thu, 21 May 2020)
Crash of backend on delete of program being recorded
Fix this crash and similar backend crashes in the scheduler
by replacing all iterations over m_tvList/m_encoderLink/m_pEncoders
from using the Qt extension foreach to the C++11 range-based for loop.
The foreach apparently makes a deep copy of the container thereby
invalidating the iterators that may be active on the same container
simultaneously in a different thread.
As an additional safeguard the qAsConst, a Qt-specific variant
of std:as_const, is added to all loops.
(cherry picked from commit 8e2872679315547abc3c2f1a91e0f7b8baac79dc)
Signed-off-by: Klaas de Waal <kdewaal at mythtv.org>
More information about the mythtv-commits