diff --git a/src/android/src/com/chariotsolutions/nfc/plugin/NfcPlugin.java b/src/android/src/com/chariotsolutions/nfc/plugin/NfcPlugin.java index e8256d83..f2c15ce9 100644 --- a/src/android/src/com/chariotsolutions/nfc/plugin/NfcPlugin.java +++ b/src/android/src/com/chariotsolutions/nfc/plugin/NfcPlugin.java @@ -737,7 +737,7 @@ private void sendEvent(String type, JSONObject tag) { PluginResult result = new PluginResult(PluginResult.Status.OK, event); result.setKeepCallback(true); - channelCallback.sendPluginResult(result); + if (channelCallback != null) channelCallback.sendPluginResult(result); } catch (JSONException e) { Log.e(TAG, "Error sending NFC event through the channel", e); }