if (!cfg_launchable(&cfg) && !do_config()) {
cleanup_exit(0);
}
+ loaded_session = TRUE; /* allow it to be launched directly */
} else if (*p == '&') {
/*
* An initial & means we've been given a command line
cfg = *cp;
UnmapViewOfFile(cp);
CloseHandle(filemap);
+ loaded_session = TRUE;
} else if (!do_config()) {
cleanup_exit(0);
}
cmdline_run_saved(&cfg);
- if (!cfg_launchable(&cfg) && !do_config()) {
+ if ((!loaded_session || !cfg_launchable(&cfg)) &&
+ !do_config()) {
cleanup_exit(0);
}
sfree(handles);
if (must_close_session)
close_session();
- }
-
- sfree(handles);
+ } else
+ sfree(handles);
while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
if (msg.message == WM_QUIT)