Attempt to stop lollipop crash

This commit is contained in:
OttoLidenbrock 2015-05-05 18:26:41 +10:00
parent f1d564e324
commit 0bb0b47e7a
2 changed files with 10 additions and 5 deletions

View File

@ -67,8 +67,11 @@ u32 getTime(TimePrecision prec) {
ClientLauncher::~ClientLauncher()
{
if (receiver)
if (receiver) {
if (device)
device->setEventReceiver(NULL);
delete receiver;
}
if (input)
delete input;
@ -76,8 +79,10 @@ ClientLauncher::~ClientLauncher()
if (g_fontengine)
delete g_fontengine;
if (device)
if (device) {
device->closeDevice();
device->drop();
}
}

View File

@ -43,8 +43,8 @@ void android_main(android_app *app)
try {
app_dummy();
char *argv[] = { (char*) "minetest" };
main(sizeof(argv) / sizeof(argv[0]), argv);
char argv[] = PROJECT_NAME;
retval = main(1, (char **)&argv);
}
catch(BaseException e) {
std::stringstream msg;
@ -63,7 +63,7 @@ void android_main(android_app *app)
porting::cleanupAndroid();
errorstream << "Shutting down minetest." << std::endl;
exit(retval);
exit(0);
}
/* handler for finished message box input */