mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-21 17:51:03 +00:00
Fix nullpointer (#12898)
Also, quit method early if file does not exist
This commit is contained in:
parent
ea55ca5e84
commit
be1bf5c05c
@ -321,13 +321,17 @@ void InsetGraphics::outBoundingBox(graphics::BoundingBox & bbox) const
|
||||
|
||||
FileName const file(params().filename.absFileName());
|
||||
|
||||
if (!file.exists())
|
||||
return;
|
||||
|
||||
// No correction is necessary for a vector image
|
||||
bool const zipped = theFormats().isZippedFile(file);
|
||||
FileName const unzipped_file = zipped ? unzipFile(file) : file;
|
||||
string const format = theFormats().getFormatFromFile(unzipped_file);
|
||||
if (zipped)
|
||||
unzipped_file.removeFile();
|
||||
if (theFormats().getFormat(format)->vectorFormat())
|
||||
if (theFormats().getFormat(format)
|
||||
&& theFormats().getFormat(format)->vectorFormat())
|
||||
return;
|
||||
|
||||
// Get the actual image dimensions in pixels
|
||||
|
Loading…
Reference in New Issue
Block a user