Fixed exception if getManifestEnvironmentVariables() is called without a current SDL activity

This commit is contained in:
Sam Lantinga 2020-06-04 12:30:25 -07:00
parent ff53521bc6
commit d0947c1483
1 changed files with 4 additions and 0 deletions

View File

@ -1088,6 +1088,10 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
*/
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) {