Skip to content

Commit

Permalink
fix null object reference (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
matheus-caldeira authored Feb 20, 2024
1 parent 2294879 commit 29ffaf3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@ public void requestBluetoothEnabled(Promise promise) {
promise.resolve(true);
} else {
Activity activity = getCurrentActivity();
mEnabledPromise = promise;
if (activity != null) {
mEnabledPromise = promise;

Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
activity.startActivityForResult(intent, BluetoothRequest.ENABLE_BLUETOOTH.code);
Expand Down

0 comments on commit 29ffaf3

Please sign in to comment.