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
public String getImageLoaderCacheKey() {
String out;
if (item.hasItemImageDownloaded()) {
if (item == null) {
return null;
} else if (item.hasItemImageDownloaded()) {
out = item.getImageLoaderCacheKey();
} else {
out = new Playable.DefaultPlayableImageLoader(this)

View File

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