diff --git a/qrenderdoc/Windows/StatisticsViewer.cpp b/qrenderdoc/Windows/StatisticsViewer.cpp index bb1f67d27..a737fa53d 100644 --- a/qrenderdoc/Windows/StatisticsViewer.cpp +++ b/qrenderdoc/Windows/StatisticsViewer.cpp @@ -746,11 +746,17 @@ void StatisticsViewer::GenerateReport() } } - texW /= texCount; - texH /= texCount; + if(texCount > 0) + { + texW /= texCount; + texH /= texCount; + } - largeTexW /= largeTexCount; - largeTexH /= largeTexCount; + if(largeTexCount > 0) + { + largeTexW /= largeTexCount; + largeTexH /= largeTexCount; + } const FrameDescription &frameInfo = m_Ctx.FrameInfo();