mirror of https://github.com/axmolengine/axmol.git
Fix pre-compiled frame work js project will crash when exit on MacOS
This commit is contained in:
parent
efbbdb1f58
commit
0c0f241c5e
|
@ -452,6 +452,7 @@ static void glfwDropFunc(GLFWwindow *window, int count, const char **files)
|
||||||
|
|
||||||
RuntimeEngine::getInstance()->setProjectConfig(_project);
|
RuntimeEngine::getInstance()->setProjectConfig(_project);
|
||||||
Application::getInstance()->run();
|
Application::getInstance()->run();
|
||||||
|
CC_SAFE_DELETE(_app);
|
||||||
// After run, application needs to be terminated immediately.
|
// After run, application needs to be terminated immediately.
|
||||||
[NSApp terminate: self];
|
[NSApp terminate: self];
|
||||||
}
|
}
|
||||||
|
@ -705,6 +706,7 @@ static void glfwDropFunc(GLFWwindow *window, int count, const char **files)
|
||||||
|
|
||||||
-(IBAction)onFileClose:(id)sender
|
-(IBAction)onFileClose:(id)sender
|
||||||
{
|
{
|
||||||
|
CC_SAFE_DELETE(_app);
|
||||||
[[NSApplication sharedApplication] terminate:self];
|
[[NSApplication sharedApplication] terminate:self];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue