diff options
author | Loris Reiff <loris.reiff@liblor.ch> | 2019-05-30 21:17:24 +0200 |
---|---|---|
committer | Loris Reiff <loris.reiff@liblor.ch> | 2019-05-30 21:17:24 +0200 |
commit | 2aaa62a37479cf079d8f44e8d9a6f7155c002b0b (patch) | |
tree | ed3b50d2343289339007354be6bdbc74692edddd /src | |
parent | d2ac5332452731e60ec6bb9c419515de22a1db29 (diff) |
Fix segmentation fault when quitting (#636)
Fix #636
Additional reference:
https://www.boost.org/doc/libs/1_70_0/libs/log/doc/html/log/rationale/why_crash_on_term.html
Diffstat (limited to 'src')
-rw-r--r-- | src/astroid.cc | 2 | ||||
-rw-r--r-- | src/main.cc | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/astroid.cc b/src/astroid.cc index 43861b2..dc52973 100644 --- a/src/astroid.cc +++ b/src/astroid.cc @@ -418,8 +418,6 @@ namespace Astroid { actions->close (); delete actions; } - - logging::core::get()->remove_all_sinks (); } int Astroid::on_command_line (const refptr<Gio::ApplicationCommandLine> & cmd) { diff --git a/src/main.cc b/src/main.cc index c0ae301..b468814 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,7 +1,12 @@ +# include <boost/log/core.hpp> # include "astroid.hh" +namespace logging = boost::log; + int main (int argc, char **argv) { Astroid::astroid = Astroid::Astroid::create (); - return Astroid::astroid->run (argc, argv); + int r = Astroid::astroid->run (argc, argv); + logging::core::get()->remove_all_sinks (); + return r; } |