mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +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.
This commit is contained in:
parent
a11e07a62f
commit
d8aab4af9e
@ -4315,10 +4315,10 @@ Buffer::ExportStatus Buffer::preview(string const & format, bool includeall) con
|
||||
ExportStatus const status = doExport(format, true, false, result_file);
|
||||
FileName const previewFile(result_file);
|
||||
|
||||
LATTEST (isClone());
|
||||
d->cloned_buffer_->d->preview_file_ = previewFile;
|
||||
d->cloned_buffer_->d->preview_format_ = format;
|
||||
d->cloned_buffer_->d->preview_error_ = (status != ExportSuccess);
|
||||
Impl * theimpl = isClone() ? d->cloned_buffer_->d : d;
|
||||
theimpl->preview_file_ = previewFile;
|
||||
theimpl->preview_format_ = format;
|
||||
theimpl->preview_error_ = (status != ExportSuccess);
|
||||
|
||||
if (status != ExportSuccess)
|
||||
return status;
|
||||
@ -4328,13 +4328,10 @@ Buffer::ExportStatus Buffer::preview(string const & format, bool includeall) con
|
||||
else
|
||||
return PreviewSuccess;
|
||||
}
|
||||
else {
|
||||
// Successful export but no output file?
|
||||
// Probably a bug in error detection.
|
||||
LATTEST (status != ExportSuccess);
|
||||
|
||||
return status;
|
||||
}
|
||||
// Successful export but no output file?
|
||||
// Probably a bug in error detection.
|
||||
LATTEST(status != ExportSuccess);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user