From 267999b6fa980635da8736690ff979854fda66dd Mon Sep 17 00:00:00 2001 From: lado Date: Fri, 4 Nov 2011 10:16:55 +0100 Subject: avoid npe --- .../src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'vdrmanager/src/de') diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java index a433e64..463e03d 100644 --- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java +++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java @@ -314,6 +314,15 @@ public abstract class BaseEventListActivity extends if (c != 0) { return c; } + if(item1.getChannelNumber() == null && item2.getChannelNumber() == null){ + return 0; + } + if(item1.getChannelNumber() == null){ + return -1; + } + if(item2.getChannelNumber() == null){ + return 1; + } return Integer.valueOf(item1.getChannelNumber()).compareTo( Integer.valueOf(item2.getChannelNumber())); } -- cgit v1.2.3