]> git.lyx.org Git - lyx.git/blobdiff - src/buffer_funcs.C
Fix bug 2404
[lyx.git] / src / buffer_funcs.C
index 0d1cb5cddfef03dedd6964469d426bfb67c964db..a306de412efbce0716e08b1f3e0d13519da27e2d 100644 (file)
@@ -194,7 +194,8 @@ Buffer * newFile(string const & filename, string const & templatename,
                        string const file = makeDisplayPath(tname, 50);
                        string const text  = bformat(_("The specified document template\n%1$s\ncould not be read."), file);
                        Alert::error(_("Could not read template"), text);
-                       // no template, start with empty buffer
+                       bufferlist.release(b);
+                       return 0;
                }
        }