Skip to content
  • Igor Kushnir's avatar
    MIDebugger: check ICore::debugController() for nullptr · 79c2b0f6
    Igor Kushnir authored
    When a user exits KDevelop while debugging a program, a queued call to
    MIDebugger::readyReadStandardOutput() may be invoked during or after
    ~CorePrivate(). If this happens after ~DebugController() (which is the
    parent of BreakpointModel), a crash is likely, because
    readyReadStandardOutput() indirectly calls
    MIBreakpointController::updateFromDebugger(), which assumes that
    BreakpointModel is not null (as do all other MIBreakpointController's
    member functions).
    
    Note that MIDebugger::readyReadStandardOutput() after ~DebugController()
    can be invoked both from inside ~MIDebugger() (more precisely, from
    inside the QProcess::waitForFinished() call) and before the destructor.
    
    There is no need to process a debugger's standard output and risk a
    crash when KDevelop has almost finished shutting down.
    
    BUG: 425993
    FIXED-IN: 5.6.1
    79c2b0f6