Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pvr/CGUIWindowPVRBase: check m_channelGroup before dereferencing it
Fixes several nullptr dereference bugs which could occur after the VNSI connection was closed by VDR, e.g.: ``` Program terminated with signal SIGSEGV, Segmentation fault. #0 __GI___pthread_mutex_lock (mutex=0xf0) at ../nptl/pthread_mutex_lock.c:65 65 ../nptl/pthread_mutex_lock.c: No such file or directory. [Current thread is 1 (Thread 0x7fabcc406980 (LWP 686))] (gdb) bt #0 __GI___pthread_mutex_lock (mutex=0xf0) at ../nptl/pthread_mutex_lock.c:65 #1 0x000055afd0fd788c in (anonymous namespace)::CRecursiveMutex::lock (this=0xf0) at xbmc/threads/platform/RecursiveMutex.h:45 #2 0x000055afd0fd8978 in (anonymous namespace)::CountingLockable<XbmcThreads::CRecursiveMutex>::lock (this=0xf0) at xbmc/threads/Lockables.h:63 #3 0x000055afd0fd87c6 in (anonymous namespace)::UniqueLock<CCriticalSection>::UniqueLock (this=0x7ffd221f0450, lockable=...) at xbmc/threads/Lockables.h:132 #4 0x000055afd0ff3fed in CSingleLock::CSingleLock (this=0x7ffd221f0450, cs=...) at xbmc/threads/SingleLock.h:39 #5 0x000055afd1bc6147 in PVR::CPVRChannelGroup::GroupName (this=0x0) at xbmc/pvr/channels/PVRChannelGroup.cpp:1142 #6 0x000055afd1b31555 in PVR::CGUIWindowPVRBase::UpdateButtons (this=0x55afd6d030b0) at xbmc/pvr/windows/GUIWindowPVRBase.cpp:480 #7 0x000055afd1b39898 in PVR::CGUIWindowPVRRecordingsBase::UpdateButtons (this=0x55afd6d030b0) at xbmc/pvr/windows/GUIWindowPVRRecordings.cpp:187 #8 0x000055afd1459dc7 in CGUIMediaWindow::Update (this=0x55afd6d030b0, strDirectory=..., updateFilterPath=true) at xbmc/windows/GUIMediaWindow.cpp:905 ```
- Loading branch information