Fix: Error can be displayed when not launched from an activity

This commit is contained in:
Boulay Mathias 2023-01-26 20:55:16 +01:00
parent 1d30eabfdf
commit aa1685fae1

View File

@ -1,5 +1,7 @@
package net.kdt.pojavlaunch;
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
import android.app.*;
import android.content.*;
import android.content.pm.*;
@ -76,6 +78,7 @@ public class PojavApplication extends Application {
} catch (Throwable throwable) {
Intent ferrorIntent = new Intent(this, FatalErrorActivity.class);
ferrorIntent.putExtra("throwable", throwable);
ferrorIntent.setFlags(FLAG_ACTIVITY_NEW_TASK);
startActivity(ferrorIntent);
}
}