]> git.lyx.org Git - features.git/commitdiff
Check to make sure we have a preview loader.
authorRichard Heck <rgheck@lyx.org>
Sun, 12 Jun 2016 03:03:15 +0000 (23:03 -0400)
committerRichard Heck <rgheck@lyx.org>
Sun, 12 Jun 2016 03:09:30 +0000 (23:09 -0400)
Fixes coverity #23353.

src/insets/RenderPreview.cpp

index b05dca65b45107576de12eb97e1df7bda074d993..59a870c412728d4a2e847cb0b4c2029818de5cb0 100644 (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;