mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2025-01-26 12:59:18 +01:00
Fixed exception if getManifestEnvironmentVariables() is called without a current SDL activity
This commit is contained in:
parent
ff53521bc6
commit
d0947c1483
@ -1088,6 +1088,10 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
*/
|
*/
|
||||||
public static boolean getManifestEnvironmentVariables() {
|
public static boolean getManifestEnvironmentVariables() {
|
||||||
try {
|
try {
|
||||||
|
if (getContext() == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
ApplicationInfo applicationInfo = getContext().getPackageManager().getApplicationInfo(getContext().getPackageName(), PackageManager.GET_META_DATA);
|
ApplicationInfo applicationInfo = getContext().getPackageManager().getApplicationInfo(getContext().getPackageName(), PackageManager.GET_META_DATA);
|
||||||
Bundle bundle = applicationInfo.metaData;
|
Bundle bundle = applicationInfo.metaData;
|
||||||
if (bundle == null) {
|
if (bundle == null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user