Browse Source

Call nsvgDeleteRasterizer() on created rasterizer (#3392)

the `NSVGrasterizer *rast` needs to be passed
to nsvgDeleteRasterizer() when we are done with it.
pull/3394/head
Masoud Naservand 1 year ago
committed by GitHub
parent
commit
d309b1eaa7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/rtextures.c

+ 2
- 0
src/rtextures.c View File

@ -384,6 +384,7 @@ Image LoadImageSvg(const char *fileNameOrString, int width, int height)
// Free used memory // Free used memory
nsvgDelete(svgImage); nsvgDelete(svgImage);
nsvgDeleteRasterizer(rast);
} }
if (isSvgStringValid && (fileData != fileNameOrString)) UnloadFileData(fileData); 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; image.format = PIXELFORMAT_UNCOMPRESSED_R8G8B8A8;
nsvgDelete(svgImage); nsvgDelete(svgImage);
nsvgDeleteRasterizer(rast);
} }
} }
#endif #endif

Loading…
Cancel
Save