fix possible segfault: auto_ptr fluxbox may be 0 ..
mathias mathias
1 files changed,
7 insertions(+),
2 deletions(-)
jump to
M
src/main.cc
→
src/main.cc
@@ -273,8 +273,13 @@ cerr<<"Fluxbox: "<<_FBTEXT(main, ErrorUnknown, "Unknown error", "Error message")<<"."<<endl;
abort(); } - bool restarting = fluxbox->isRestarting(); - const std::string restart_argument(fluxbox->getRestartArgument()); + bool restarting = false; + std::string restart_argument; + + if (fluxbox.get()) { + restarting = fluxbox->isRestarting(); + restart_argument = fluxbox->getRestartArgument(); + } // destroy fluxbox fluxbox.reset(0);