diff --git a/mythtv/programs/mythbackend/mainserver.cpp b/mythtv/programs/mythbackend/mainserver.cpp
index 76e3702a44..2cfdf22b2e 100644
a
|
b
|
void MainServer::DoHandleStopRecording( |
2919 | 2919 | |
2920 | 2920 | elink->StopRecording(); |
2921 | 2921 | |
| 2922 | // Repeated access of m_encoderList after StopRecording causes crash |
| 2923 | for (int i=0; i<100000; i++) |
| 2924 | { |
| 2925 | int j = 0; |
| 2926 | for (auto iter2 = m_encoderList->begin(); iter2 != m_encoderList->end(); ++iter2) |
| 2927 | { |
| 2928 | j++; |
| 2929 | EncoderLink *elink2 = *iter2; |
| 2930 | if (elink2->IsLocal()) |
| 2931 | { |
| 2932 | (void) iter2.key(); |
| 2933 | } |
| 2934 | } |
| 2935 | } |
| 2936 | |
2922 | 2937 | while (elink->IsBusyRecording() || |
2923 | 2938 | elink->GetState() == kState_ChangingState) |
2924 | 2939 | { |
… |
… |
void MainServer::DoHandleStopRecording( |
2930 | 2945 | if (m_sched) |
2931 | 2946 | m_sched->UpdateRecStatus(&recinfo); |
2932 | 2947 | } |
| 2948 | |
| 2949 | // End loop after recording found |
| 2950 | break; |
2933 | 2951 | } |
2934 | 2952 | } |
2935 | 2953 | TVRec::s_inputsLock.unlock(); |