aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathias <mathias>2004-11-24 11:46:07 (GMT)
committermathias <mathias>2004-11-24 11:46:07 (GMT)
commit9f4b2978c38cf2278f80a2b5e20d25524b6f8d48 (patch)
tree732d2dac5a26cbf32268f8453963e663dddcc719
parentf7c92157ac358c295de60308fc5b80ab45cdb0ec (diff)
downloadfluxbox_pavel-9f4b2978c38cf2278f80a2b5e20d25524b6f8d48.zip
fluxbox_pavel-9f4b2978c38cf2278f80a2b5e20d25524b6f8d48.tar.bz2
fix possible segfault: auto_ptr fluxbox may be 0 ..
-rw-r--r--src/main.cc9
1 files 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) {
273 abort(); 273 abort();
274 } 274 }
275 275
276 bool restarting = fluxbox->isRestarting(); 276 bool restarting = false;
277 const std::string restart_argument(fluxbox->getRestartArgument()); 277 std::string restart_argument;
278
279 if (fluxbox.get()) {
280 restarting = fluxbox->isRestarting();
281 restart_argument = fluxbox->getRestartArgument();
282 }
278 283
279 // destroy fluxbox 284 // destroy fluxbox
280 fluxbox.reset(0); 285 fluxbox.reset(0);