mirror of
https://github.com/zxing/zxing.git
synced 2025-01-12 11:47:26 -08:00
Avoid an NPE by checking for null handler
git-svn-id: https://zxing.googlecode.com/svn/trunk@2864 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
e4432a0991
commit
99f4f03f9a
|
@ -668,11 +668,13 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
|||
}
|
||||
|
||||
private void sendReplyMessage(int id, Object arg, long delayMS) {
|
||||
Message message = Message.obtain(handler, id, arg);
|
||||
if (delayMS > 0L) {
|
||||
handler.sendMessageDelayed(message, delayMS);
|
||||
} else {
|
||||
handler.sendMessage(message);
|
||||
if (handler != null) {
|
||||
Message message = Message.obtain(handler, id, arg);
|
||||
if (delayMS > 0L) {
|
||||
handler.sendMessageDelayed(message, delayMS);
|
||||
} else {
|
||||
handler.sendMessage(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue