diff --git a/qrenderdoc/Widgets/Extended/RDHeaderView.cpp b/qrenderdoc/Widgets/Extended/RDHeaderView.cpp index 4fd613110..d61081368 100644 --- a/qrenderdoc/Widgets/Extended/RDHeaderView.cpp +++ b/qrenderdoc/Widgets/Extended/RDHeaderView.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include "Code/QRDUtils.h" ///////////////////////////////////////////////////////////////////////////////// @@ -476,9 +477,13 @@ void RDHeaderView::setRootIndex(const QModelIndex &index) // *before* the root index changes). if(!m_sectionStretchHints.isEmpty()) { - GUIInvoke::defer([this]() { - cacheSectionMinSizes(); - resizeSectionsWithHints(); + QPointer ptr; + GUIInvoke::defer([ptr]() { + if(ptr) + { + ptr->cacheSectionMinSizes(); + ptr->resizeSectionsWithHints(); + } }); } }