Op 5-1-2011 16:08, [email protected] schreef:
Author: tommaso
Date: Wed Jan  5 16:08:08 2011
New Revision: 37115
URL: http://www.lyx.org/trac/changeset/37115

Log:
Avoid crash on exiting LyX while Adv Search is shown in full-screen mode.

Modified:
    lyx-devel/trunk/src/frontends/qt4/FindAndReplace.cpp

Modified: lyx-devel/trunk/src/frontends/qt4/FindAndReplace.cpp
==============================================================================
--- lyx-devel/trunk/src/frontends/qt4/FindAndReplace.cpp        Wed Jan  5 
15:02:35 2011        (r37114)
+++ lyx-devel/trunk/src/frontends/qt4/FindAndReplace.cpp        Wed Jan  5 
16:08:08 2011        (r37115)
@@ -315,17 +315,18 @@

  void FindAndReplaceWidget::findAndReplaceScope(FindAndReplaceOptions&  opt)
  {
-       view_.setBusy(true);
-       int wrap_answer = -1;
-       ostringstream oss;
-       oss<<  opt;
-       FuncRequest cmd(LFUN_WORD_FINDADV, from_utf8(oss.str()));
        BufferView * bv = view_.documentBufferView();
+       if (!bv)
+               return;

We should be able to search in all manuals without a document open ?

Also, we should not even be able to do a search on the current buffer if there is no buffer. The find-replace-widget should disable the corresponing buttons that allow to search the current buffer.

Vincent

Reply via email to