[PATCH] gui: do not run search while trace still loading
Tapani Pälli
tapani.palli at intel.com
Thu Feb 12 01:25:53 PST 2015
Patch fixes a crash if impatient user (like me) makes a search
before trace has been loaded.
Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
---
gui/mainwindow.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp
index a503b5d..ff89ad7 100644
--- a/gui/mainwindow.cpp
+++ b/gui/mainwindow.cpp
@@ -1118,6 +1118,10 @@ void MainWindow::slotSearchNext(const QString &str,
Q_ASSERT(call || frame);
if (!frame) {
+ // Trace is still loading.
+ if (!call) {
+ return;
+ }
frame = call->parentFrame();
}
Q_ASSERT(frame);
@@ -1133,6 +1137,10 @@ void MainWindow::slotSearchPrev(const QString &str,
Q_ASSERT(call || frame);
if (!frame) {
+ // Trace is still loading.
+ if (!call) {
+ return;
+ }
frame = call->parentFrame();
}
Q_ASSERT(frame);
--
2.1.0
More information about the apitrace
mailing list