}
// Push directory path.
- string const path = buffer->temppath();
- support::Path p(FileName(path));
+ string const path(buffer->temppath());
+ // Prevent the compiler from optimizing away p
+ FileName pp(path);
+ support::Path p(pp);
// there are three cases here:
// 1. we print to a file
InsetIterator it = inset_iterator_begin(inset);
InsetIterator const end = inset_iterator_end(inset);
for (; it != end; ++it) {
- if (inset_code == InsetBase::NO_CODE
- || inset_code == it->lyxCode()) {
+ if (!it->asInsetMath()
+ && (inset_code == InsetBase::NO_CODE
+ || inset_code == it->lyxCode())) {
LCursor tmpcur = cur;
tmpcur.pushLeft(*it);
it->dispatch(tmpcur, fr);