Author: vfr
Date: Thu Oct 27 15:58:53 2011
New Revision: 40039
URL: http://www.lyx.org/trac/changeset/40039
Log:
branch: Fix a crash in adv F&R when a manual could not be loaded
see r40027.
Modified:
lyx-devel/branches/BRANCH_2_0_X/src/frontends/qt4/FindAndReplace.cpp
lyx-devel/branches/BRANCH_2_0_X/status.20x
Modified: lyx-devel/branches/BRANCH_2_0_X/src/frontends/qt4/FindAndReplace.cpp
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/src/frontends/qt4/FindAndReplace.cpp
Thu Oct 27 15:17:40 2011 (r40038)
+++ lyx-devel/branches/BRANCH_2_0_X/src/frontends/qt4/FindAndReplace.cpp
Thu Oct 27 15:58:53 2011 (r40039)
@@ -305,6 +305,11 @@
guiApp->currentView()->setBusy(true);
}
buf = theBufferList().getBuffer(fname);
+ if (!buf) {
+ view_.setBusy(false);
+ return false;
+ }
+
lyx::dispatch(FuncRequest(LFUN_BUFFER_SWITCH,
buf->absFileName()));
bv = view_.documentBufferView();
@@ -327,7 +332,9 @@
// No match found in current buffer (however old selection
might have been replaced)
// select next buffer in scope, if any
- bool prompt = nextPrevBuffer(buf, opt);
+ bool const prompt = nextPrevBuffer(buf, opt);
+ if (!buf)
+ break;
if (prompt) {
if (wrap_answer != -1)
break;
Modified: lyx-devel/branches/BRANCH_2_0_X/status.20x
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/status.20x Thu Oct 27 15:17:40 2011
(r40038)
+++ lyx-devel/branches/BRANCH_2_0_X/status.20x Thu Oct 27 15:58:53 2011
(r40039)
@@ -212,6 +212,9 @@
* ADVANCED FIND AND REPLACE
+- Fix a crash when searching in all manuals, but the manuals could
+ not be loaded.
+
* BUILD/INSTALLATION