mirror of
https://github.com/minetest/minetest.git
synced 2025-01-12 16:27:30 +01:00
Fix crash on startup (Windows)
This commit is contained in:
parent
3be9787e64
commit
17a173f474
@ -75,8 +75,7 @@ bool * signal_handler_killstatus(void)
|
|||||||
|
|
||||||
void sigint_handler(int sig)
|
void sigint_handler(int sig)
|
||||||
{
|
{
|
||||||
if(g_killed == false)
|
if(!g_killed) {
|
||||||
{
|
|
||||||
dstream<<DTIME<<"INFO: sigint_handler(): "
|
dstream<<DTIME<<"INFO: sigint_handler(): "
|
||||||
<<"Ctrl-C pressed, shutting down."<<std::endl;
|
<<"Ctrl-C pressed, shutting down."<<std::endl;
|
||||||
|
|
||||||
@ -86,9 +85,7 @@ void sigint_handler(int sig)
|
|||||||
debug_stacks_print();*/
|
debug_stacks_print();*/
|
||||||
|
|
||||||
g_killed = true;
|
g_killed = true;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
(void)signal(SIGINT, SIG_DFL);
|
(void)signal(SIGINT, SIG_DFL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -598,7 +595,7 @@ void initializePaths()
|
|||||||
getExecPathFromProcfs(buf, sizeof(buf));
|
getExecPathFromProcfs(buf, sizeof(buf));
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
pathRemoveFile(buf, '/');
|
pathRemoveFile(buf, DIR_DELIM_CHAR);
|
||||||
std::string execpath(buf);
|
std::string execpath(buf);
|
||||||
|
|
||||||
path_share = execpath + DIR_DELIM "..";
|
path_share = execpath + DIR_DELIM "..";
|
||||||
|
Loading…
Reference in New Issue
Block a user