summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoranbr <vdr07@deltab.de>2017-04-02 15:17:07 +0200
committeranbr <vdr07@deltab.de>2017-04-02 15:17:07 +0200
commit014348a24b931cc36c1c8892111f7b13370be530 (patch)
treebcfd9ebaecd31aa923555a12d7364446dd7e14dc
parent53c1ce607e80a2dc964cb4182dab62becd22659f (diff)
downloadvdr-plugin-targavfd-014348a24b931cc36c1c8892111f7b13370be530.tar.gz
vdr-plugin-targavfd-014348a24b931cc36c1c8892111f7b13370be530.tar.bz2
Fix: release every lock=Schedules (Closes: #2487)
-rw-r--r--watch.c52
1 files changed, 27 insertions, 25 deletions
diff --git a/watch.c b/watch.c
index c738982..031f148 100644
--- a/watch.c
+++ b/watch.c
@@ -259,7 +259,7 @@ void cVFDWatch::Action(void)
}
}
if(bSuspend != bLastSuspend) {
- clear();
+ clear();
bReDraw = true;
bFlush= true;
bLastSuspend = bSuspend;
@@ -870,35 +870,37 @@ bool cVFDWatch::Program() {
cSchedulesLock lock;
const cSchedules * schedules = cSchedules::Schedules(lock);
#endif
- if (chID.Valid() && schedules) {
- const cSchedule * schedule = schedules->GetSchedule(chID);
- if (schedule && (p = schedule->GetPresentEvent()) != NULL) {
- if(!chPresentTime || chEventID != p->EventID()) {
- bChanged = true;
- chEventID = p->EventID();
- chPresentTime = p->StartTime();
- chFollowingTime = p->EndTime();
-
- if(chPresentTitle) {
- delete chPresentTitle;
- chPresentTitle = NULL;
- }
- if (!isempty(p->Title())) {
- chPresentTitle = new cString(p->Title());
- }
+ if (schedules) {
+ if (chID.Valid()) {
+ const cSchedule * schedule = schedules->GetSchedule(chID);
+ if (schedule && (p = schedule->GetPresentEvent()) != NULL) {
+ if(!chPresentTime || chEventID != p->EventID()) {
+ bChanged = true;
+ chEventID = p->EventID();
+ chPresentTime = p->StartTime();
+ chFollowingTime = p->EndTime();
+
+ if(chPresentTitle) {
+ delete chPresentTitle;
+ chPresentTitle = NULL;
+ }
+ if (!isempty(p->Title())) {
+ chPresentTitle = new cString(p->Title());
+ }
- if(chPresentShortTitle) {
- delete chPresentShortTitle;
- chPresentShortTitle = NULL;
- }
- if (!isempty(p->ShortText())) {
- chPresentShortTitle = new cString(p->ShortText());
+ if(chPresentShortTitle) {
+ delete chPresentShortTitle;
+ chPresentShortTitle = NULL;
+ }
+ if (!isempty(p->ShortText())) {
+ chPresentShortTitle = new cString(p->ShortText());
+ }
}
}
}
-#if APIVERSNUM >= 20302
+ #if APIVERSNUM >= 20302
lock.Remove();
-#endif
+ #endif
}
return bChanged;
}