Thanks. I've also removed the Q_ASSERTs (as they aren't right per your code) and pushed.
Jose On Thu, Feb 12, 2015 at 9:25 AM, Tapani Pälli <tapani.pa...@intel.com> wrote: > Patch fixes a crash if impatient user (like me) makes a search > before trace has been loaded. > > Signed-off-by: Tapani Pälli <tapani.pa...@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 > > _______________________________________________ > apitrace mailing list > apitrace@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/apitrace >
_______________________________________________ apitrace mailing list apitrace@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/apitrace