From 9f4b2978c38cf2278f80a2b5e20d25524b6f8d48 Mon Sep 17 00:00:00 2001 From: mathias Date: Wed, 24 Nov 2004 11:46:07 +0000 Subject: fix possible segfault: auto_ptr fluxbox may be 0 .. --- src/main.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main.cc b/src/main.cc index 31a0c2f..c91fb3f 100644 --- a/src/main.cc +++ b/src/main.cc @@ -273,8 +273,13 @@ int main(int argc, char **argv) { 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); -- cgit v0.11.2