From c2a025300fb4532305eee310ed6c1d36d8f05ead Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 16 Jul 2020 15:34:29 -0400 Subject: [PATCH] Remove debug --- src/zm_image.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/zm_image.cpp b/src/zm_image.cpp index 5ab1a5405..2eb5356d2 100644 --- a/src/zm_image.cpp +++ b/src/zm_image.cpp @@ -572,7 +572,9 @@ uint8_t* Image::WriteBuffer(const unsigned int p_width, const unsigned int p_hei return buffer; } -/* Assign an existing buffer to the image instead of copying from a source buffer. The goal is to reduce the amount of memory copying and increase efficiency and buffer reusing. */ +/* Assign an existing buffer to the image instead of copying from a source buffer. + The goal is to reduce the amount of memory copying and increase efficiency and buffer reusing. +*/ void Image::AssignDirect( const unsigned int p_width, const unsigned int p_height, @@ -581,6 +583,7 @@ void Image::AssignDirect( uint8_t *new_buffer, const size_t buffer_size, const int p_buffertype) { + if ( new_buffer == NULL ) { Error("Attempt to directly assign buffer from a NULL pointer"); return; @@ -640,7 +643,6 @@ void Image::AssignDirect( buffertype = p_buffertype; buffer = new_buffer; } -Debug(1, "In assign direct"); } void Image::Assign(const unsigned int p_width, const unsigned int p_height, const unsigned int p_colours, const unsigned int p_subpixelorder, const uint8_t* new_buffer, const size_t buffer_size) {