summaryrefslogtreecommitdiff
path: root/src/quickfix.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2011-12-30 15:01:59 +0100
committerBram Moolenaar <Bram@vim.org>2011-12-30 15:01:59 +0100
commitfc57380c3f1370c26b8c1eddcf9bccbad58e11aa (patch)
tree83291ac1aab0c1172618691576dcb4ed3a46f1b4 /src/quickfix.c
parent5d6f75e17e783b4ce6702b243cf8fda107592e87 (diff)
downloadvim-git-fc57380c3f1370c26b8c1eddcf9bccbad58e11aa.tar.gz
updated for version 7.3.390v7.3.390
Problem: Using NULL buffer pointer in a window. Solution: Check for w_buffer being NULL in more places. (Bjorn Winckler)
Diffstat (limited to 'src/quickfix.c')
-rw-r--r--src/quickfix.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/quickfix.c b/src/quickfix.c
index 0502392c9..a2935bea9 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -2675,7 +2675,7 @@ qf_fill_buffer(qi)
bt_quickfix(buf)
buf_T *buf;
{
- return (buf->b_p_bt[0] == 'q');
+ return buf != NULL && buf->b_p_bt[0] == 'q';
}
/*
@@ -2686,8 +2686,8 @@ bt_quickfix(buf)
bt_nofile(buf)
buf_T *buf;
{
- return (buf->b_p_bt[0] == 'n' && buf->b_p_bt[2] == 'f')
- || buf->b_p_bt[0] == 'a';
+ return buf != NULL && ((buf->b_p_bt[0] == 'n' && buf->b_p_bt[2] == 'f')
+ || buf->b_p_bt[0] == 'a');
}
/*
@@ -2697,7 +2697,7 @@ bt_nofile(buf)
bt_dontwrite(buf)
buf_T *buf;
{
- return (buf->b_p_bt[0] == 'n');
+ return buf != NULL && buf->b_p_bt[0] == 'n';
}
int