mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Guess at avoiding an NPE reported by a user
git-svn-id: https://zxing.googlecode.com/svn/trunk@1970 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
359551d6e7
commit
27a047ebe2
|
@ -567,10 +567,12 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
||||||
} else if (source == Source.ZXING_LINK) {
|
} else if (source == Source.ZXING_LINK) {
|
||||||
// Replace each occurrence of RETURN_CODE_PLACEHOLDER in the returnUrlTemplate
|
// Replace each occurrence of RETURN_CODE_PLACEHOLDER in the returnUrlTemplate
|
||||||
// with the scanned code. This allows both queries and REST-style URLs to work.
|
// with the scanned code. This allows both queries and REST-style URLs to work.
|
||||||
Message message = Message.obtain(handler, R.id.launch_product_query);
|
if (returnUrlTemplate != null) {
|
||||||
message.obj = returnUrlTemplate.replace(RETURN_CODE_PLACEHOLDER,
|
Message message = Message.obtain(handler, R.id.launch_product_query);
|
||||||
resultHandler.getDisplayContents().toString());
|
message.obj = returnUrlTemplate.replace(RETURN_CODE_PLACEHOLDER,
|
||||||
handler.sendMessageDelayed(message, INTENT_RESULT_DURATION);
|
String.valueOf(resultHandler.getDisplayContents()));
|
||||||
|
handler.sendMessageDelayed(message, INTENT_RESULT_DURATION);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue