The state of caf::Viewer::isComparisonViewActive() and Rim3dView::activeComparisonView()
can be out-of-sync until all events have been processed by the Qt event loop.
The caf::Viewer state is updated as part of an scheduled display update, but the
update to Rim3dView is a direct call.
Fix crash by checking for nullptr from Rim3dView::activeComparisonView().
Closes#7024.