Fixed NullPointerException in FeedMedia

This commit is contained in:
daniel oeh 2014-07-07 21:34:37 +02:00
parent 74294bad55
commit af4929728f
2 changed files with 4 additions and 1 deletions

View File

@ -401,7 +401,9 @@ public class FeedMedia extends FeedFile implements Playable {
@Override @Override
public String getImageLoaderCacheKey() { public String getImageLoaderCacheKey() {
String out; String out;
if (item.hasItemImageDownloaded()) { if (item == null) {
return null;
} else if (item.hasItemImageDownloaded()) {
out = item.getImageLoaderCacheKey(); out = item.getImageLoaderCacheKey();
} else { } else {
out = new Playable.DefaultPlayableImageLoader(this) out = new Playable.DefaultPlayableImageLoader(this)

View File

@ -126,6 +126,7 @@ public class PlaybackServiceMediaPlayer {
try { try {
playMediaObject(playable, false, stream, startWhenPrepared, prepareImmediately); playMediaObject(playable, false, stream, startWhenPrepared, prepareImmediately);
} catch (RuntimeException e) { } catch (RuntimeException e) {
e.printStackTrace();
throw e; throw e;
} finally { } finally {
playerLock.unlock(); playerLock.unlock();