Yes, I think I've answered you in a previous mail already (mail in copy
at the end of this one).

>
>         case LFUN_BOOKMARK_GOTO: {

put an assert here:
+         BOOST_ASSERT(lyx_view_);

I did that. And there is no failure here. The problem seems to be that

+                       // if the file is not opened, open it.
+                       if (!theBufferList().exists(bm.filename))
+                               open(bm.filename);

bm.filename is not actually opened, but theBufferList think it is in
there, and then, LFUN_BUFFER_SWITCH will crash. I changed open to
dispatch LFUN_FILE_OPEN, and the problem persists.

+                       // open may fail, so we need to test it again
+                       if (theBufferList().exists(bm.filename)) {
+                               // if the current buffer is not that one, 
switch to it.
+                               if (lyx_view_->buffer()->fileName() != 
bm.filename)
+                                       
dispatch(FuncRequest(LFUN_BUFFER_SWITCH, bm.filename));

I guess you know better about the reasons.

Bo

Reply via email to