Call nsvgDeleteRasterizer() on created rasterizer

the `NSVGrasterizer *rast` needs to be passed
to nsvgDeleteRasterizer() when we are done with it.
This commit is contained in:
Masoud Naservand 2023-10-09 06:27:25 +03:30
parent 5ed7717f0d
commit 904c0cd1e4

View File

@ -384,6 +384,7 @@ Image LoadImageSvg(const char *fileNameOrString, int width, int height)
// Free used memory
nsvgDelete(svgImage);
nsvgDeleteRasterizer(rast);
}
if (isSvgStringValid && (fileData != fileNameOrString)) UnloadFileData(fileData);
@ -555,6 +556,7 @@ Image LoadImageFromMemory(const char *fileType, const unsigned char *fileData, i
image.format = PIXELFORMAT_UNCOMPRESSED_R8G8B8A8;
nsvgDelete(svgImage);
nsvgDeleteRasterizer(rast);
}
}
#endif