summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlado <herrlado@gmail.com>2013-05-26 22:53:14 +0200
committerlado <herrlado@gmail.com>2013-05-26 22:53:14 +0200
commit241ae4d10710f825b1cfcc0ccbd48ecdfb7993ba (patch)
tree2a76342a9e1b733e58f819a133d4e9d7935dc33a
parente4fe15c33291bb0becd1701d1ea946d2021e424e (diff)
downloadvdr-manager-241ae4d10710f825b1cfcc0ccbd48ecdfb7993ba.tar.gz
vdr-manager-241ae4d10710f825b1cfcc0ccbd48ecdfb7993ba.tar.bz2
fIX NPE
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java
index 1762f43..861746c 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java
@@ -476,6 +476,15 @@ public class EpgDetailsActivity extends ICSBaseActivity implements
final Event cEvent = epgs.get(pager.getCurrentItem());
+
+ final Timerable timerable;
+
+ if(cEvent instanceof Timerable){
+ timerable = (Timerable)cEvent;
+ } else {
+ return;
+ }
+
switch (v.getId()) {
case R.id.epg_event_livetv:
if (cEvent instanceof Recording) {
@@ -511,8 +520,7 @@ public class EpgDetailsActivity extends ICSBaseActivity implements
public void onClick(DialogInterface dialog, int which) {
final Timer t;
if (timer == null) {
- //t = timerable.createTimer();
- t = null;
+ t = timerable.createTimer();
} else {
t = timer;
}