From c9945c50c3cfd49c00a458e3f0be7ef5be60439f Mon Sep 17 00:00:00 2001 From: manuel Date: Sat, 2 May 2009 23:05:28 +0200 Subject: some more assert()s again --- ue2/imgsynth2/cpixelformat_bgr555.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ue2/imgsynth2/cpixelformat_bgr555.cpp') diff --git a/ue2/imgsynth2/cpixelformat_bgr555.cpp b/ue2/imgsynth2/cpixelformat_bgr555.cpp index ba12cb5..35205e8 100644 --- a/ue2/imgsynth2/cpixelformat_bgr555.cpp +++ b/ue2/imgsynth2/cpixelformat_bgr555.cpp @@ -18,6 +18,7 @@ void CPixelFormat_BGR555::getPixel(RGBPIXEL& pixel, uint32_t x, uint32_t y) if (m_bitmap->getPixelData() == NULL) throw PixelFormatError("No pixelbuffer allocated."); assert(m_bitmap->getPixelDataSize() > 0); + assert(m_bitmap->getRowSize() > 0); /* if the y-coordinates are mirrored */ if (m_bitmap->isMirrored()) @@ -42,6 +43,7 @@ void CPixelFormat_BGR555::setPixel(const RGBPIXEL& pixel, uint32_t x, uint32_t y if (m_bitmap->getPixelData() == NULL) throw PixelFormatError("No pixelbuffer allocated."); assert(m_bitmap->getPixelDataSize() > 0); + assert(m_bitmap->getRowSize() > 0); /* if the y-coordinates are mirrored */ if (m_bitmap->isMirrored()) -- cgit v1.2.3