From 46f37cfd3af013fea958fdf78cd0bd06b01d5ce9 Mon Sep 17 00:00:00 2001 From: Bo Peng Date: Sun, 23 Mar 2008 04:02:33 +0000 Subject: [PATCH] Fix GRAPHICS_EDIT of InsetGraphics git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23899 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetGraphics.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/insets/InsetGraphics.cpp b/src/insets/InsetGraphics.cpp index 0953912cf9..de06ea4983 100644 --- a/src/insets/InsetGraphics.cpp +++ b/src/insets/InsetGraphics.cpp @@ -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; } -- 2.39.2