]> git.lyx.org Git - lyx.git/commitdiff
Fix GRAPHICS_EDIT of InsetGraphics
authorBo Peng <bpeng@lyx.org>
Sun, 23 Mar 2008 04:02:33 +0000 (04:02 +0000)
committerBo Peng <bpeng@lyx.org>
Sun, 23 Mar 2008 04:02:33 +0000 (04:02 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23899 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetGraphics.cpp

index 0953912cf970e013586565a1d8ccaf50cef3e333..de06ea498383da131923dfa1d25691b3b4537e36 100644 (file)
@@ -175,9 +175,12 @@ void InsetGraphics::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
        switch (cmd.action) {
        case LFUN_GRAPHICS_EDIT: {
+               // use buffer() from cursor because this inset may not
+               // have an initialized buffer_.
+               Buffer const & buf = cur.bv().buffer();
                InsetGraphicsParams p;
-               InsetGraphicsMailer::string2params(to_utf8(cmd.argument()), buffer(), p);
-               editGraphics(p, buffer());
+               InsetGraphicsMailer::string2params(to_utf8(cmd.argument()), buf, p);
+               editGraphics(p, buf);
                break;
        }