Fixed crash that occured when loading a FeedItem without an enclosure
from the DB
This commit is contained in:
parent
dc32fb843d
commit
d8d4d28602
|
@ -415,9 +415,11 @@ public class FeedManager {
|
|||
.getColumnIndex(PodDBAdapter.KEY_CONTENT_ENCODED)));
|
||||
item.setPubDate(new Date(itemlistCursor.getLong(itemlistCursor
|
||||
.getColumnIndex(PodDBAdapter.KEY_PUBDATE))));
|
||||
item.setMedia(adapter.getFeedMedia(itemlistCursor
|
||||
.getLong(itemlistCursor
|
||||
.getColumnIndex(PodDBAdapter.KEY_MEDIA)), item));
|
||||
long mediaId = itemlistCursor.getLong(itemlistCursor
|
||||
.getColumnIndex(PodDBAdapter.KEY_MEDIA));
|
||||
if (mediaId != 0) {
|
||||
item.setMedia(adapter.getFeedMedia(mediaId, item));
|
||||
}
|
||||
item.read = (itemlistCursor.getInt(itemlistCursor
|
||||
.getColumnIndex(PodDBAdapter.KEY_READ)) > 0) ? true
|
||||
: false;
|
||||
|
|
|
@ -16,7 +16,7 @@ public class FeedItemMenuHandler {
|
|||
private FeedItemMenuHandler() {
|
||||
|
||||
}
|
||||
|
||||
// TODO Fix crash when media is null
|
||||
public static boolean onPrepareMenu(Menu menu, FeedItem selectedItem) {
|
||||
FeedManager manager = FeedManager.getInstance();
|
||||
|
||||
|
|
Loading…
Reference in New Issue