Commit cd157932 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Visualization: simplify nullptr checking

parent f76f5d56
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -465,14 +465,12 @@ void VisualizationGeant4Module::finalize() {
    UI->ApplyCommand("/vis/viewer/set/autoRefresh true");

    // Set new signal handler to fetch CTRL+C and close the Qt application
    if(gui_session_ != nullptr) {
        has_gui = true;
    }
    prev_handler = std::signal(SIGINT, interrupt_handler);

    // Open GUI / terminal or start viewer depending on mode
    if(mode_ == ViewingMode::GUI && has_gui) {
    if(mode_ == ViewingMode::GUI && gui_session_ != nullptr) {
        LOG(INFO) << "Starting visualization session";
        has_gui = true;
        gui_session_->SessionStart();
    } else if(mode_ == ViewingMode::TERMINAL) {
        LOG(INFO) << "Starting terminal session";