From 427a413e9c9b8a84c0327d063a090b5ee52adc3c Mon Sep 17 00:00:00 2001 From: marko <> Date: Thu, 30 Nov 2006 12:40:33 +0000 Subject: [PATCH] branches/zip: buf_page_peek_block(): Do not invoke buf_block_get_state() on a NULL pointer. This error was introduced in r1082. --- buf/buf0buf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/buf/buf0buf.c b/buf/buf0buf.c index 0905751ce2f..8907c052bc6 100644 --- a/buf/buf0buf.c +++ b/buf/buf0buf.c @@ -1208,7 +1208,9 @@ buf_page_peek_block( mutex_exit(&(buf_pool->mutex)); - if (UNIV_UNLIKELY(buf_block_get_state(block) != BUF_BLOCK_FILE_PAGE)) { + if (block + && UNIV_UNLIKELY(buf_block_get_state(block) + != BUF_BLOCK_FILE_PAGE)) { block = NULL; }