--- android/TrainInfo/src/dk/thoerup/traininfo/DepartureListAdapter.java 2010/07/10 16:03:10 981 +++ android/TrainInfo/src/dk/thoerup/traininfo/DepartureListAdapter.java 2010/09/16 15:32:42 1066 @@ -11,6 +11,7 @@ import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.TextView; +import dk.thoerup.android.traininfo.common.DepartureEntry; public class DepartureListAdapter extends BaseAdapter { @@ -67,11 +68,13 @@ ((TextView) root.findViewById(R.id.Time)).setText(station.getTime()); ((TextView) root.findViewById(R.id.Destination)).setText(station.getDestination()); - if (station.getStatus().length() > 0 || station.getNote().length() > 0) { + + if ( (station.getStatus() != null && station.getStatus().length() > 0) || (station.getNote() != null && station.getNote().length() > 0) ) { ImageView image = (ImageView) root.findViewById(R.id.InfoIcon); - String status = station.getStatus().toLowerCase(); - String note = station.getNote().toLowerCase(); + + String status = (station.getStatus() != null) ? station.getStatus().toLowerCase() : ""; + String note = (station.getNote() != null) ? station.getNote().toLowerCase() : ""; int iconID; if (status.indexOf("aflyst") > -1 || note.indexOf("aflyst") > -1 ) {