diff --git a/android/src/com/google/zxing/client/android/CaptureActivity.java b/android/src/com/google/zxing/client/android/CaptureActivity.java index f02f740fd..8b9c92592 100755 --- a/android/src/com/google/zxing/client/android/CaptureActivity.java +++ b/android/src/com/google/zxing/client/android/CaptureActivity.java @@ -491,10 +491,14 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal contentsTextView.setTextSize(TypedValue.COMPLEX_UNIT_SP, scaledSize); TextView supplementTextView = (TextView) findViewById(R.id.contents_supplement_text_view); - supplementTextView.setText(""); - supplementTextView.setOnClickListener(null); - if (PreferenceManager.getDefaultSharedPreferences(this).getBoolean(PreferencesActivity.KEY_SUPPLEMENTAL, true)) { - SupplementalInfoRetriever.maybeInvokeRetrieval(supplementTextView, resultHandler.getResult(), handler, this); + if (supplementTextView != null) { + supplementTextView.setText(""); + supplementTextView.setOnClickListener(null); + if (PreferenceManager.getDefaultSharedPreferences(this).getBoolean(PreferencesActivity.KEY_SUPPLEMENTAL, true)) { + SupplementalInfoRetriever.maybeInvokeRetrieval(supplementTextView, resultHandler.getResult(), handler, this); + } + } else { + Log.w(TAG, "Unable to find supplement text view?"); } int buttonCount = resultHandler.getButtonCount();