Check to make sure we have a preview loader.

Fixes coverity #23353.
This commit is contained in:
Richard Heck 2016-06-11 23:03:15 -04:00
parent a637efca6e
commit df022f91b4

View File

@ -104,6 +104,9 @@ docstring const statusMessage(BufferView const * bv, string const & snippet)
Buffer const & buffer = bv->buffer();
graphics::PreviewLoader const * loader = buffer.loader();
// please coverity (probably worth the check anyway)
if (!loader)
return docstring();
graphics::PreviewLoader::Status const status = loader->status(snippet);
docstring message;