Call nsvgDeleteRasterizer() on created rasterizer (#3392)

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 11:17:54 +03:30 committed by GitHub
parent ea9de852bd
commit d309b1eaa7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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