            uint32_t flags = REPLAY_FLAG_NONE, QString data_dir = "", QObject *parent = 0);
    ~Replay();
    bool load();
    void start(int seconds = 0);
    void stop();
    void pause(bool pause);
    bool isPaused() const { return paused_; }
  
  signals:
    void segmentChanged();
 
</s> remove Replay *replay = nullptr;
 </s> add  </s> remove   stop();
}

void Replay::stop() {
 </s> add  </s> remove   replay = new Replay(route, allow, block, nullptr, replay_flags, parser.value("data_dir"), &app);
 </s> add   Replay *replay = new Replay(route, allow, block, nullptr, replay_flags, parser.value("data_dir"), &app); </s> remove   if (replay) {
    replay->stop();
  }
 </s> add 
            uint32_t flags = REPLAY_FLAG_NONE, QString data_dir = "", QObject *parent = 0);
    ~Replay();
    bool load();
    void start(int seconds = 0);

    void pause(bool pause);
    bool isPaused() const { return paused_; }
  
  signals:
    void segmentChanged();
keep keep keep keep replace keep keep keep keep keep
 replay: fix segfault or hanging on quit (#23323) 
selfdrive/ui/replay/replay.h