fix: Fix NPE when opening video from different App (#53)

This commit is contained in:
Joey Peter 2022-07-05 09:22:41 +02:00 committed by GitHub
parent 2710d50f66
commit 3c0408fa09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,7 +101,10 @@ public class Whitelist {
} }
private static boolean isWhitelisted(WhitelistType whitelistType) { private static boolean isWhitelisted(WhitelistType whitelistType) {
boolean isEnabled = enabledMap.get(whitelistType); boolean isEnabled = false;
if(enabledMap.containsKey(whitelistType) && enabledMap.get(whitelistType) != null) {
isEnabled = enabledMap.get(whitelistType);
}
if (!isEnabled) { if (!isEnabled) {
return false; return false;
} }
@ -173,4 +176,4 @@ public class Whitelist {
public static void setEnabled(WhitelistType whitelistType, boolean enabled) { public static void setEnabled(WhitelistType whitelistType, boolean enabled) {
enabledMap.put(whitelistType, enabled); enabledMap.put(whitelistType, enabled);
} }
} }