Hi Bram, How to reproduce (on Linux): - Go to Vim source directory $ cd /path/to/your/vim - Configure with enabling gui gnome2 $ ./configure --with-features=huge --enable-gui=gnome2 --enable-fail-if-missing - Make $ make - Run vanilla CLI Vim $ src/vim -Nu NONE - Execute the following command. :call balloon_show("Hi")
Expected behavior: - Nothing happens. (Or an error message is output?) Actual behavior: - SEGV Attached patch fixes this. -- Best regards, Hirohito Higashi (a.k.a. h_east) -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
diff --git a/src/gui_beval.c b/src/gui_beval.c index dd61945..a63ede4 100644 --- a/src/gui_beval.c +++ b/src/gui_beval.c @@ -437,6 +437,9 @@ get_beval_info( void gui_mch_post_balloon(BalloonEval *beval, char_u *mesg) { + if (beval == NULL) + return; + beval->msg = mesg; if (mesg != NULL) drawBalloon(beval); diff --git a/src/gui_w32.c b/src/gui_w32.c index cd9f31e..13ea26f 100644 --- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -8582,7 +8582,7 @@ gui_mch_post_balloon(BalloonEval *beval, char_u *mesg) { POINT pt; // TRACE0("gui_mch_post_balloon {{{"); - if (beval->showState == ShS_SHOWING) + if (beval == NULL || beval->showState == ShS_SHOWING) return; GetCursorPos(&pt); ScreenToClient(s_textArea, &pt);