diff options
author | Andrew Dolgov <[email protected]> | 2017-06-08 18:46:34 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2017-06-08 18:46:34 +0300 |
commit | f172c5b2ac86ab771392aa85130ff2eae31ff3fe (patch) | |
tree | e4cde6a46866ae5b68a363a0141a487c683c729e /org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java | |
parent | 7bdfe419aaa366402ca31c9cfb5b13e19af62b83 (diff) |
headlines: in onContextItemSelected check if adapter context menu info is there
Diffstat (limited to 'org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java')
-rwxr-xr-x | org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java index 6071b72c..7fe22cac 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java @@ -249,12 +249,15 @@ public class HeadlinesFragment extends Fragment { AdapterContextMenuInfo info = (AdapterContextMenuInfo) item .getMenuInfo(); - Article article = getArticleAtPosition(info.position - m_adapter.getHeaderCount()); + if (info != null) { - if (!onArticleMenuItemSelected(item, article, info.position)) - return super.onContextItemSelected(item); - else - return true; + Article article = getArticleAtPosition(info.position - m_adapter.getHeaderCount()); + + if (!onArticleMenuItemSelected(item, article, info.position)) + return super.onContextItemSelected(item); + } + + return super.onContextItemSelected(item); } public HeadlinesFragment() { |