Prevent an assert when opening the citation dialog if the bibtex

database is not found.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8232 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2003-12-11 14:42:39 +00:00
parent 041004baac
commit 559c84c370
2 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2003-12-11 Angus Leeming <leeming@lyx.org>
* QCitationDialog.C (availableChanged, selectedChanged): ensure that
the bibkeysInfo map is populated before calling biblio::getInfo.
Prevents and assert when the bibtex database is not found.
2003-12-10 Angus Leeming <leeming@lyx.org>
* QExternal.C, ui/QExternalDialogBase.ui: add a 'draft' check box

View File

@ -83,7 +83,9 @@ void QCitationDialog::selectedChanged()
return;
}
infoML->setText(toqstr(biblio::getInfo(theMap, form_->citekeys[sel])));
if (!theMap.empty())
infoML->setText(
toqstr(biblio::getInfo(theMap, form_->citekeys[sel])));
setButtons();
}
@ -111,7 +113,9 @@ void QCitationDialog::availableChanged()
return;
}
add_->infoML->setText(toqstr(biblio::getInfo(theMap, form_->bibkeys[sel])));
if (!theMap.empty())
add_->infoML->setText(
toqstr(biblio::getInfo(theMap, form_->bibkeys[sel])));
setButtons();
}