Be a bit more careful here. In weird cases, this can be null.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40600 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2012-01-12 02:09:08 +00:00
parent 20f61c7eb7
commit 6f3dd321f3

View File

@ -3109,10 +3109,16 @@ bool GuiView::GuiViewPrivate::asyncBufferProcessing(
gv_->message(msg);
}
GuiViewPrivate::busyBuffers.insert(used_buffer);
Buffer * cloned_buffer = used_buffer->cloneFromMaster();
if (!cloned_buffer) {
Alert::error(_("Export Error"),
_("Error cloning the Buffer."));
return false;
}
QFuture<Buffer::ExportStatus> f = QtConcurrent::run(
asyncFunc,
used_buffer,
used_buffer->cloneFromMaster(),
cloned_buffer,
format);
setPreviewFuture(f);
last_export_format = used_buffer->params().bufferFormat();