Fixed a possible deadlock in detailview

This commit is contained in:
kamel5 2019-09-07 17:23:32 +02:00
parent f4369c0772
commit 41eb32389d
2 changed files with 5 additions and 5 deletions

View File

@ -1,12 +1,12 @@
#include "detailview.h" #include "detailview.h"
cDetailView::cDetailView(const cEvent *event, cFooter *footer) { cDetailView::cDetailView(const cEvent *event, cFooter *footer) : cThread("DetailView") {
this->event = event; this->event = event;
this->footer = footer; this->footer = footer;
} }
cDetailView::~cDetailView(void){ cDetailView::~cDetailView(void){
Cancel(-1); Cancel(3);
while (Active()) while (Active())
cCondWait::SleepMs(10); cCondWait::SleepMs(10);
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301

6
view.c
View File

@ -5,7 +5,7 @@
* cView * cView
********************************************************************************************/ ********************************************************************************************/
cView::cView(void) { cView::cView(void) : cThread("View") {
activeView = 0; activeView = 0;
scrollable = false; scrollable = false;
tabbed = false; tabbed = false;
@ -641,7 +641,7 @@ cSeriesView::cSeriesView(int seriesId, int episodeId) : cView() {
} }
cSeriesView::~cSeriesView(void) { cSeriesView::~cSeriesView(void) {
Cancel(-1); Cancel(3);
while (Active()) while (Active())
cCondWait::SleepMs(10); cCondWait::SleepMs(10);
} }
@ -863,7 +863,7 @@ cMovieView::cMovieView(int movieId) : cView() {
} }
cMovieView::~cMovieView(void) { cMovieView::~cMovieView(void) {
Cancel(-1); Cancel(3);
while (Active()) while (Active())
cCondWait::SleepMs(10); cCondWait::SleepMs(10);
} }