Mercurial > vim
comparison src/gui_w32.c @ 14208:4cb334816bb1 v8.1.0121
patch 8.1.0121: crash when using ballooneval related to 'vartabstop'
commit https://github.com/vim/vim/commit/ca4b613c692b927c9345dc9e3d6be5de35266be2
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jun 28 12:05:11 2018 +0200
patch 8.1.0121: crash when using ballooneval related to 'vartabstop'
Problem: Crash when using ballooneval related to 'vartabstop'.
Solution: Initialize balloonEval->vts to NULL. (Markus Braun)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 28 Jun 2018 12:15:06 +0200 |
parents | 2ad722003b36 |
children | d876b8588731 |
comparison
equal
deleted
inserted
replaced
14207:72a425590918 | 14208:4cb334816bb1 |
---|---|
8920 { | 8920 { |
8921 IEMSG(_("E232: Cannot create BalloonEval with both message and callback")); | 8921 IEMSG(_("E232: Cannot create BalloonEval with both message and callback")); |
8922 return NULL; | 8922 return NULL; |
8923 } | 8923 } |
8924 | 8924 |
8925 beval = (BalloonEval *)alloc(sizeof(BalloonEval)); | 8925 beval = (BalloonEval *)alloc_clear(sizeof(BalloonEval)); |
8926 if (beval != NULL) | 8926 if (beval != NULL) |
8927 { | 8927 { |
8928 beval->target = s_textArea; | 8928 beval->target = s_textArea; |
8929 beval->balloon = NULL; | |
8930 | 8929 |
8931 beval->showState = ShS_NEUTRAL; | 8930 beval->showState = ShS_NEUTRAL; |
8932 beval->x = 0; | |
8933 beval->y = 0; | |
8934 beval->msg = mesg; | 8931 beval->msg = mesg; |
8935 beval->msgCB = mesgCB; | 8932 beval->msgCB = mesgCB; |
8936 beval->clientData = clientData; | 8933 beval->clientData = clientData; |
8937 #ifdef FEAT_VARTABS | |
8938 beval->vts = NULL; | |
8939 #endif | |
8940 | 8934 |
8941 InitCommonControls(); | 8935 InitCommonControls(); |
8942 cur_beval = beval; | 8936 cur_beval = beval; |
8943 | 8937 |
8944 if (p_beval) | 8938 if (p_beval) |
8945 gui_mch_enable_beval_area(beval); | 8939 gui_mch_enable_beval_area(beval); |
8946 | |
8947 } | 8940 } |
8948 return beval; | 8941 return beval; |
8949 } | 8942 } |
8950 | 8943 |
8951 static void | 8944 static void |