Problem: Crash when memory allocation fails.
Solution: Check for NULL curwin and curbuf. (Christian Brabandt,
closes #4839)
void
parse_queued_messages(void)
{
- int old_curwin_id = curwin->w_id;
- int old_curbuf_fnum = curbuf->b_fnum;
+ int old_curwin_id;
+ int old_curbuf_fnum;
int i;
int save_may_garbage_collect = may_garbage_collect;
static int entered = 0;
if (updating_screen)
return;
+ // If memory allocation fails during startup we'll exit but curbuf or
+ // curwin could be NULL.
+ if (curbuf == NULL || curwin == NULL)
+ return;
+
+ old_curbuf_fnum = curbuf->b_fnum;
+ old_curwin_id = curwin->w_id;
+
++entered;
// may_garbage_collect is set in main_loop() to do garbage collection when
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2200,
/**/
2199,
/**/