From 10101ed2242dce9e5a681f10b530f25203a9c817 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Mon, 21 Apr 2014 18:34:06 +0200 Subject: [PATCH] Fixed possible crash on startup. --- src/com/github/nutomic/controldlna/gui/RouteFragment.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/com/github/nutomic/controldlna/gui/RouteFragment.java b/src/com/github/nutomic/controldlna/gui/RouteFragment.java index bf5aa03..a55a9b9 100644 --- a/src/com/github/nutomic/controldlna/gui/RouteFragment.java +++ b/src/com/github/nutomic/controldlna/gui/RouteFragment.java @@ -582,8 +582,10 @@ OnSeekBarChangeListener, OnScrollListener { * When in playlist mode, scrolls to the item that is currently playing. */ public void scrollToCurrent() { - mListView.smoothScrollToPosition( - mMediaRouterPlayService.getService().getCurrentTrack()); + if (mMediaRouterPlayService != null) { + mListView.smoothScrollToPosition( + mMediaRouterPlayService.getService().getCurrentTrack()); + } } }