mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-06 03:18:14 +00:00
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user