diff --git a/extensions/imageloader.c b/extensions/imageloader.c index bd702ad..59e4c3e 100644 --- a/extensions/imageloader.c +++ b/extensions/imageloader.c @@ -178,14 +178,22 @@ cImageImporterSVG::cImageImporterSVG() { cImageImporterSVG::~cImageImporterSVG() { if (handle) { - rsvg_handle_read_stream_sync(handle, NULL, NULL, NULL); +#if LIBRSVG_CHECK_VERSION (2, 46, 0) + // rsvg_handle_close is deprecated since version 2.46 and looks like even not required if used with rsvg_handle_new_from_file +#else + rsvg_handle_close(handle, NULL); +#endif g_object_unref(handle); } } bool cImageImporterSVG::LoadImage(const char *path) { if (handle) { - rsvg_handle_read_stream_sync(handle, NULL, NULL, NULL); +#if LIBRSVG_CHECK_VERSION (2, 46, 0) + // rsvg_handle_close is deprecated since version 2.46 and looks like even not required if used with rsvg_handle_new_from_file +#else + rsvg_handle_close(handle, NULL); +#endif g_object_unref(handle); } @@ -521,3 +529,5 @@ void cSVGTemplate::ReplaceTokens(string &line, size_t tokenStart, size_t tokenEn std::replace( svgAlpha.begin(), svgAlpha.end(), ',', '.'); line.replace(hitAlpha, hitAlphaEnd - hitAlpha + 2, svgAlpha); } + +// vim: ts=4 sw=4 et