In TerminalDisplay::resetCursorStyle() check that Session* isn't aRemove TerminalDisplay::sessionIsPrimaryScreen(), and use Q_ASSERT
instead, where if _sessionController is actually a nullptr it means
the current konsole process is doomed anyway. Better catch such cases in
nullptr before accessing itdebug builds.