mirror of
https://github.com/paxed/dgamelaunch.git
synced 2025-07-28 16:14:33 +02:00
Fix segfault when no mkdir or chdir defined
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@358 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
parent
d107435cff
commit
f4a322f996
@ -1959,13 +1959,17 @@ main (int argc, char** argv)
|
||||
myconfig[userchoice]->bin_args[i] = tmp;
|
||||
}
|
||||
|
||||
tmp = strdup(dgl_format_str(userchoice, me, myconfig[userchoice]->mkdir));
|
||||
free(myconfig[userchoice]->mkdir);
|
||||
myconfig[userchoice]->mkdir = tmp;
|
||||
if (myconfig[userchoice]->mkdir) {
|
||||
tmp = strdup(dgl_format_str(userchoice, me, myconfig[userchoice]->mkdir));
|
||||
free(myconfig[userchoice]->mkdir);
|
||||
myconfig[userchoice]->mkdir = tmp;
|
||||
}
|
||||
|
||||
tmp = strdup(dgl_format_str(userchoice, me, myconfig[userchoice]->chdir));
|
||||
free(myconfig[userchoice]->chdir);
|
||||
myconfig[userchoice]->chdir = tmp;
|
||||
if (myconfig[userchoice]->chdir) {
|
||||
tmp = strdup(dgl_format_str(userchoice, me, myconfig[userchoice]->chdir));
|
||||
free(myconfig[userchoice]->chdir);
|
||||
myconfig[userchoice]->chdir = tmp;
|
||||
}
|
||||
|
||||
/* launch program */
|
||||
ttyrec_main (userchoice, me->username, gen_ttyrec_filename());
|
||||
|
Loading…
x
Reference in New Issue
Block a user