]> git.cworth.org Git - apitrace/blobdiff - gui/mainwindow.cpp
gui: Implement a new surface viewer
[apitrace] / gui / mainwindow.cpp
index 23729cd6d274f7f7b920fb2278286b13dcc6a05c..00469bca3d9f67450daa196472ef4a7302eeed53 100644 (file)
@@ -370,8 +370,11 @@ void MainWindow::replayTrace(bool dumpState, bool dumpThumbnails)
 
 void MainWindow::trimEvent()
 {
+    int trimIndex = 0;
+
+    Q_ASSERT(m_trimEvent->type() == ApiTraceEvent::Call ||
+             m_trimEvent->type() == ApiTraceEvent::Frame);
 
-    int trimIndex;
     if (m_trimEvent->type() == ApiTraceEvent::Call) {
         ApiTraceCall *call = static_cast<ApiTraceCall*>(m_trimEvent);
         trimIndex = call->index();