> Michael Wookey wrote: > > > > One bug that I didn't fix. Build gvim.exe with OLE=no, run 'gvim - > register', > > > and watch it crash while trying to display an error message. > > > > This seems to fix the bug... > > > > Index: src/message.c > > =================================================================== > > --- src/message.c (revision 212) > > +++ src/message.c (working copy) > > @@ -2987,7 +2987,7 @@ > > * If 'verbosefile' is set write message in that file. > > * Must come before the rest because of updating "msg_col". > > */ > > - if (*p_vfile != NUL) > > + if (p_vfile && *p_vfile != NUL) > > verbose_write(s, maxlen); > > > > if (redir_fd != NULL > > Index: src/misc2.c > > =================================================================== > > --- src/misc2.c (revision 212) > > +++ src/misc2.c (working copy) > > @@ -1748,7 +1748,7 @@ > > return NULL; > > } > > #endif > > - while ((b = *p) != NUL) > > + while (p && (b = *p) != NUL) > > { > > if (b == c) > > return p; > > > > Well, that may fix it, but the problem is that the order of > initializations is violated. Normally all option pointers are not > NULL. > > What is the message that triggers this problem? That message should > probably be changed to mch_errmsg().
The actual error message "wrapper" is src/gui_w32:ole_error() which just wraps EMSG2(). When calling "gvim -register", the error propagates from src/gui_w32.c:gui_mch_prepare(). I agree that the above patch fixes the symptom of the bug, but not the true cause. cheers