diff --git a/CNFGFunctions.c b/CNFGFunctions.c index 639d662..1e62228 100644 --- a/CNFGFunctions.c +++ b/CNFGFunctions.c @@ -33,10 +33,6 @@ OTHER DEALINGS IN THE SOFTWARE. #include "TextTool/FontData.h" #endif -//TODO: Refactor to remove malloc reliance. -#ifndef __clang__ -#endif - int CNFGPenX, CNFGPenY; uint32_t CNFGBGColor; uint32_t CNFGLastColor; diff --git a/CNFGXDriver.c b/CNFGXDriver.c index 26cae5b..ef5bb53 100644 --- a/CNFGXDriver.c +++ b/CNFGXDriver.c @@ -549,7 +549,7 @@ void CNFGUpdateScreenWithBitmap( uint32_t * data, int w, int h ) { static int lw, lh; - if( lw != w || lh != h ) + if( lw != w || lh != h || !xi ) { if( xi ) free( xi ); xi = XCreateImage(CNFGDisplay, CNFGVisual, CNFGDepth, ZPixmap, 0, (char*)data, w, h, 32, w*4 ); diff --git a/rawdraw_sf.h b/rawdraw_sf.h index 9b4f51e..d7b7362 100644 --- a/rawdraw_sf.h +++ b/rawdraw_sf.h @@ -1,5 +1,5 @@ //This file was automatically generated by Makefile at https://github.com/cntools/rawdraw -//Generated from files git hash ce81fa80a8ae034546fa93b392b282fe9815319c on Sat May 11 07:49:24 PM PDT 2024 (This is not the git hash of this file) +//Generated from files git hash a53ea30df86f5876197873975efee3dbc983a942 on Mon Jun 10 06:52:08 PM PDT 2024 (This is not the git hash of this file) // Copyright 2010-2021 <>< CNLohr, et. al. (Several other authors, many but not all mentioned) // Licensed under the MIT/x11 or NewBSD License you choose. // @@ -6078,7 +6078,7 @@ void CNFGUpdateScreenWithBitmap( uint32_t * data, int w, int h ) { static int lw, lh; - if( lw != w || lh != h ) + if( lw != w || lh != h || !xi ) { if( xi ) free( xi ); xi = XCreateImage(CNFGDisplay, CNFGVisual, CNFGDepth, ZPixmap, 0, (char*)data, w, h, 32, w*4 );