Skip to content

Commit 1908a4d

Browse files
authored
Merge pull request #693 from kasperkberg/patch-1
Null-check instance prior to being called in fetchStoredSettings
2 parents 39aea01 + d784305 commit 1908a4d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

android/src/main/java/io/wazo/callkeep/RNCallKeepModule.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,11 +1079,11 @@ private WritableMap storeSettings(ReadableMap options) {
10791079
}
10801080

10811081
protected static void fetchStoredSettings(@Nullable Context fromContext) {
1082-
Context context = fromContext != null ? fromContext : instance.getAppContext();
1083-
if (instance == null && context == null) {
1082+
if (instance == null && fromContext == null) {
10841083
Log.w(TAG, "[RNCallKeepModule][fetchStoredSettings] no instance nor fromContext.");
10851084
return;
10861085
}
1086+
Context context = fromContext != null ? fromContext : instance.getAppContext();
10871087
_settings = new WritableNativeMap();
10881088
if (context == null) {
10891089
Log.w(TAG, "[RNCallKeepModule][fetchStoredSettings] no react context found.");

0 commit comments

Comments
 (0)