]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfunc.C
add GuiView parent to QToc for proper memory management.
[lyx.git] / src / lyxfunc.C
index 9f32b16bbbbbd90db27f10e1cc448d2822502ffe..f0978b48ef03f17c43daf9c10fe592823ca41fcd 100644 (file)
@@ -1004,8 +1004,10 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                        }
 
                        // 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