On Thu, Sep 29, 2016 at 12:52:02PM +0200, Guillaume Munch wrote: > > Thanks for the backtrace. The problem is that the variable BufferView * > bv_ in ViewSourceWidget is a borrowed pointer with unclear lifetime, > i.e. it will dangle. I have decided to get rid of it entirely, but this > requires a few changes to the Dialog architecture and takes some time to > implement (hopefully with bigger benefits). So I pushed a quick fix in > the meantime.
I had arrived to the same conclusion and was pushing the (perhaps simpler) attached patch, but you beated me ;) -- Enrico
diff --git a/src/frontends/qt4/GuiViewSource.cpp b/src/frontends/qt4/GuiViewSource.cpp index db50b47..ed26f40 100644 --- a/src/frontends/qt4/GuiViewSource.cpp +++ b/src/frontends/qt4/GuiViewSource.cpp @@ -454,6 +454,7 @@ bool GuiViewSource::initialiseParams(string const & /*source*/) void GuiViewSource::updateTitle() { + widget_->setBufferView(bufferview()); docstring const format = widget_->currentFormatName(); QString const title = format.empty() ? qt_("Code Preview") : qt_("%1[[preview format name]] Preview")