Bennett Helm wrote:
On the User's List, Scott Lambert reported -- and I can confirm -- a problem with opening documents when LyX is not currently running. Simply double-clicking the document icon (or dragging it onto the LyX icon in the Dock) launches LyX.app, which then immediately quits. Console spits out the following:

Assertion triggered in lyx::BufferView* lyx::LyXFunc::view() const by failing check "lyx_view_" in file lyxfunc.C:2105

Try this patch please.

Abdel.
Index: GuiApplication.C
===================================================================
--- GuiApplication.C    (revision 18010)
+++ GuiApplication.C    (working copy)
@@ -206,6 +206,10 @@
        switch(e->type()) {
        case QEvent::FileOpen: {
                // Open a file; this happens only on Mac OS X for now
+               BufferView * bv = currentView()->view();
+               if (!bv)
+                       return false;
+
                QFileOpenEvent * foe = static_cast<QFileOpenEvent *>(e);
                lyx::dispatch(FuncRequest(LFUN_FILE_OPEN,
                                          fromqstr(foe->file())));

Reply via email to