On Sat, Mar 22, 2008 at 06:07:40PM -0400, rgheck wrote: > Stefan Schimanski wrote: >> Another buffer pointer crash: >> >> * insert graphics >> * open graphics dialog for new inset >> * click edit >> * => segfault/assert >> > Looks like the problem is here: > case LFUN_GRAPHICS_EDIT: { > FuncRequest fr(action, argument); > InsetGraphics().dispatch(view()->cursor(), fr); > break; > } > This creates a null InsetGraphics on which to call dispatch(), and the > buffer isn't set. This is likely also to be a problem a couple lines > earlier: > case LFUN_EXTERNAL_EDIT: { > BOOST_ASSERT(lyx_view_); > FuncRequest fr(action, argument); > InsetExternal().dispatch(view()->cursor(), fr); > break; > } > Looks like we'll get the same crash, I'd think. > > I don't know this code well enough to know how to fix it.
InsetExternal inset; inset.setBuffer(...); inset.dispatch(); for ... use some Buffer refrence. Usually there's some nearby, view()->buffer() or such. Andre'