浏览代码

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年前
committed by GitHub
父节点
当前提交
d309b1eaa7
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. +2
    -0
      src/rtextures.c

+ 2
- 0
src/rtextures.c 查看文件

@ -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

正在加载...
取消
保存