work around against crash when long tapping on an article header

This commit is contained in:
Andrew Dolgov 2013-04-08 22:56:02 +04:00
parent fd6e8c6278
commit 5ad5d27cc0
2 changed files with 3 additions and 3 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.fox.ttrss"
android:versionCode="156"
android:versionName="1.4.6" >
android:versionCode="157"
android:versionName="1.4.7" >
<uses-sdk
android:minSdkVersion="8"

View File

@ -67,7 +67,7 @@ public class ArticleFragment extends Fragment implements GestureDetector.OnDoubl
if (v.getId() == R.id.content) {
HitTestResult result = ((WebView)v).getHitTestResult();
if (result.getType() == HitTestResult.IMAGE_TYPE || result.getType() == HitTestResult.SRC_IMAGE_ANCHOR_TYPE) {
if (result != null && (result.getType() == HitTestResult.IMAGE_TYPE || result.getType() == HitTestResult.SRC_IMAGE_ANCHOR_TYPE)) {
menu.setHeaderTitle(result.getExtra());
getActivity().getMenuInflater().inflate(R.menu.article_content_img_context_menu, menu);