Scott Kostyshak wrote:

> I'm getting a SIGSEGV now. I can reproduce on Ubuntu 12.04 with the
> following: 1. Open the User's Guide, Additional Features, Embedded
> Objects, or Math manual. 2. Select all
> 3. Copy

Thanks, I can reproduce it. The attached patch works around the problem. It 
looks like the temp buffer misses the math macro definitions (a call to 
updateMacros() which should set docit_ did not help). Does anybody know a 
better solution?


Georg
diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp
index 4cfdbca..b3bca44 100644
--- a/src/mathed/InsetMathHull.cpp
+++ b/src/mathed/InsetMathHull.cpp
@@ -2181,7 +2181,7 @@ docstring InsetMathHull::xhtml(XHTMLStream & xs, OutputParams const & op) const
 	// aren't doing LaTeX, in which case we are doing Images.
 	if (!success && mathtype != BufferParams::LaTeX) {
 		graphics::PreviewImage const * pimage = 0;
-		if (!op.dryrun) {
+		if (!op.dryrun && docit_.buffer()) {
 			loadPreview(docit_);
 			pimage = preview_->getPreviewImage(buffer());
 			// FIXME Do we always have png?

Reply via email to