mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
main.cpp: manage the default filename/directory on the heap
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e8e6fd40e8
commit
645bc0b46e
1 changed files with 5 additions and 0 deletions
5
main.cpp
5
main.cpp
|
@ -34,6 +34,9 @@ int main(int argc, char **argv)
|
|||
(arguments.at(1) == QString("--win32console"));
|
||||
subsurface_console_init(dedicated_console);
|
||||
|
||||
const char *default_directory = system_default_directory();
|
||||
const char *default_filename = system_default_filename();
|
||||
|
||||
for (i = 1; i < arguments.length(); i++) {
|
||||
QString a = arguments.at(i);
|
||||
if (a.at(0) == '-') {
|
||||
|
@ -83,6 +86,8 @@ int main(int argc, char **argv)
|
|||
exit_ui();
|
||||
taglist_free(g_tag_list);
|
||||
parse_xml_exit();
|
||||
free((void *)default_directory);
|
||||
free((void *)default_filename);
|
||||
subsurface_console_exit();
|
||||
free_prefs();
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue