Fix crash when browsing in the Edit->Preferences dialog and

when no buffer is open. (Applies to 1.3.x only.)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_3_X@10005 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2005-06-06 14:13:52 +00:00
parent 802c005580
commit 611e7104b7
2 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2005-06-06 Angus Leeming <leeming@lyx.org>
* helper_funcs.C (browseFile, browseDir): check whether latex
will be happy with the file name only when we have a buffer.
2005-05-31 Angus Leeming <leeming@lyx.org>
* helper_funcs.C (get_invalid_chars_latex): allow ':' characters

View File

@ -80,7 +80,9 @@ string const browseFile(LyXView * lv,
FileDialog::Result result;
string const & result_path = result.second;
string const invalid_chars = lv->buffer()->isLatex() ?
string const invalid_chars =
(check_returned_filename &&
lv && lv->buffer() && lv->buffer()->isLatex()) ?
get_invalid_chars_latex() : string();
while (true) {
@ -147,7 +149,9 @@ string const browseDir(LyXView * lv,
FileDialog::Result result;
string const & result_path = result.second;
string const invalid_chars = lv->buffer()->isLatex() ?
string const invalid_chars =
(check_returned_pathname &&
lv && lv->buffer() && lv->buffer()->isLatex()) ?
get_invalid_chars_latex() : string();
while (true) {