Skip to content

Commit

Permalink
Fixed exception if getManifestEnvironmentVariables() is called withou…
Browse files Browse the repository at this point in the history
…t a current SDL activity
  • Loading branch information
slouken committed Jun 4, 2020
1 parent ff53521 commit d0947c1
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -1088,6 +1088,10 @@ public static DisplayMetrics getDisplayDPI() {
*/
public static boolean getManifestEnvironmentVariables() {
try {
if (getContext() == null) {
return false;
}

ApplicationInfo applicationInfo = getContext().getPackageManager().getApplicationInfo(getContext().getPackageName(), PackageManager.GET_META_DATA);
Bundle bundle = applicationInfo.metaData;
if (bundle == null) {
Expand Down

0 comments on commit d0947c1

Please sign in to comment.