fix possible segfault: auto_ptr fluxbox may be 0 ..

This commit is contained in:
mathias 2004-11-24 11:46:07 +00:00
parent f7c92157ac
commit 9f4b2978c3

View file

@ -273,8 +273,13 @@ int main(int argc, char **argv) {
abort(); abort();
} }
bool restarting = fluxbox->isRestarting(); bool restarting = false;
const std::string restart_argument(fluxbox->getRestartArgument()); std::string restart_argument;
if (fluxbox.get()) {
restarting = fluxbox->isRestarting();
restart_argument = fluxbox->getRestartArgument();
}
// destroy fluxbox // destroy fluxbox
fluxbox.reset(0); fluxbox.reset(0);