Skip to content

Commit a14c254

Browse files
author
Chris Bellew
committed
Prevent some crashes.
1 parent 5b910cc commit a14c254

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

mobile/src/main/java/com/atomjack/vcfp/fragments/PlayerFragment.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,8 @@ protected void onMediaChange() {
219219
}
220220

221221
public void showNowPlaying() {
222-
showNowPlaying(true);
223-
}
224-
225-
// This will be called with setView=false when a new track starts playing. We don't need to set the view again (and it seems to mess up the display of the album cover)
226-
public void showNowPlaying(boolean setView) {
222+
if(mainView == null)
223+
return;
227224
if (nowPlayingMedia instanceof PlexVideo) {
228225
PlexVideo video = (PlexVideo)nowPlayingMedia;
229226
if(video.isMovie() || video.isClip()) {

mobile/src/main/java/com/atomjack/vcfp/model/PlexServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public void findServerConnection(final ActiveConnectionHandler activeConnectionH
182182
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("EEEE, MMMM d, yyyy 'at' h:mm:ss a");
183183
Logger.d("[PlexServer] finding server connection for %s, current active connection expires: %s, now: %s",
184184
name,
185-
simpleDateFormat.format(activeConnectionExpires.getTime()),
185+
activeConnectionExpires != null ? simpleDateFormat.format(activeConnectionExpires.getTime()) : null,
186186
simpleDateFormat.format(Calendar.getInstance().getTime()));
187187
if(activeConnectionExpires != null && !activeConnectionExpires.before(Calendar.getInstance())) {
188188
activeConnectionHandler.onSuccess(activeConnection);

0 commit comments

Comments
 (0)