Add comment about coverity #102061.

This commit is contained in:
Richard Heck 2016-06-12 00:22:09 -04:00
parent 7b15ea393f
commit f19d650752

View File

@ -1464,6 +1464,8 @@ void GuiApplication::gotoBookmark(unsigned int idx, bool openFile,
// if the current buffer is not that one, switch to it. // if the current buffer is not that one, switch to it.
BufferView * doc_bv = current_view_ ? BufferView * doc_bv = current_view_ ?
current_view_->documentBufferView() : 0; current_view_->documentBufferView() : 0;
// FIXME It's possible that doc_bv is null!!
// See coverity #102061
Cursor const old = doc_bv->cursor(); Cursor const old = doc_bv->cursor();
if (!doc_bv || doc_bv->buffer().fileName() != tmp.filename) { if (!doc_bv || doc_bv->buffer().fileName() != tmp.filename) {
if (switchToBuffer) { if (switchToBuffer) {