mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 02:49:46 +00:00
Fix thinko in Buffer::preview. It is possible for this routine to
be called when we do not have a cloned Buffer, namely, if we do not
have EXPORT_in_THREAD defined.
(cherry picked from commit d8aab4af9e
)
This commit is contained in:
parent
87bc92cfe1
commit
b02a93d7e8
@ -4311,10 +4311,10 @@ Buffer::ExportStatus Buffer::preview(string const & format, bool includeall) con
|
|||||||
ExportStatus const status = doExport(format, true, false, result_file);
|
ExportStatus const status = doExport(format, true, false, result_file);
|
||||||
FileName const previewFile(result_file);
|
FileName const previewFile(result_file);
|
||||||
|
|
||||||
LATTEST (isClone());
|
Impl * theimpl = isClone() ? d->cloned_buffer_->d : d;
|
||||||
d->cloned_buffer_->d->preview_file_ = previewFile;
|
theimpl->preview_file_ = previewFile;
|
||||||
d->cloned_buffer_->d->preview_format_ = format;
|
theimpl->preview_format_ = format;
|
||||||
d->cloned_buffer_->d->preview_error_ = (status != ExportSuccess);
|
theimpl->preview_error_ = (status != ExportSuccess);
|
||||||
|
|
||||||
if (status != ExportSuccess)
|
if (status != ExportSuccess)
|
||||||
return status;
|
return status;
|
||||||
@ -4324,13 +4324,10 @@ Buffer::ExportStatus Buffer::preview(string const & format, bool includeall) con
|
|||||||
else
|
else
|
||||||
return PreviewSuccess;
|
return PreviewSuccess;
|
||||||
}
|
}
|
||||||
else {
|
// Successful export but no output file?
|
||||||
// Successful export but no output file?
|
// Probably a bug in error detection.
|
||||||
// Probably a bug in error detection.
|
LATTEST(status != ExportSuccess);
|
||||||
LATTEST (status != ExportSuccess);
|
return status;
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -89,6 +89,8 @@ What's new
|
|||||||
|
|
||||||
- Fix command clash between beamer and covington (from the Linguistics module).
|
- Fix command clash between beamer and covington (from the Linguistics module).
|
||||||
|
|
||||||
|
- Fix crash on Buffer preview when not exporting in thread.
|
||||||
|
|
||||||
|
|
||||||
* LYX2LYX
|
* LYX2LYX
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user