From e0330c48100c721cd87c07ec9397b2ff2eda76ae Mon Sep 17 00:00:00 2001 From: Johann Date: Wed, 7 Jun 2017 12:25:05 -0700 Subject: [PATCH] buffer.h: Only allow Init() to be called once. Change-Id: I041c8b6f314802833c5287a176dbfeec9461b08e --- test/buffer.h | 1 + 1 file changed, 1 insertion(+) diff --git a/test/buffer.h b/test/buffer.h index 8fbab2270..ec4dfbe7b 100644 --- a/test/buffer.h +++ b/test/buffer.h @@ -95,6 +95,7 @@ class Buffer { bool CheckValues(const Buffer &a) const; bool Init() { + if (raw_buffer_ != NULL) return false; EXPECT_GT(width_, 0); EXPECT_GT(height_, 0); EXPECT_GE(top_padding_, 0);