fixed more leaks

This commit is contained in:
aap
2020-04-25 00:37:49 +02:00
parent 7fdb483d4e
commit c4ffa3622a
16 changed files with 131 additions and 66 deletions

View File

@@ -109,10 +109,9 @@ Charset::setColors(const RGBA *foreground, const RGBA *background)
img->palette[7] = foreground->alpha;
Raster *newRaster = Raster::createFromImage(img);
if(newRaster == nil){
img->destroy();
img->destroy();
if(newRaster == nil)
return nil;
}
if(this->raster)
this->raster->destroy();
this->raster = newRaster;