[librsvg/librsvg-2.44: 1/2] Librsvg 2.44
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/librsvg-2.44: 1/2] Librsvg 2.44
- Date: Wed, 29 Aug 2018 01:23:07 +0000 (UTC)
commit 63cf74bc6d0546e7421d696dd25f239d78ee7ade
Author: Federico Mena Quintero <federico mena gmail com>
Date: Wed Aug 29 01:22:54 2018 +0000
Librsvg 2.44
COMPILING.md | 4 ++--
NEWS | 6 ++++++
librsvg/rsvg-handle.c | 26 +++++++++++++++++++-------
3 files changed, 27 insertions(+), 9 deletions(-)
---
diff --git a/COMPILING.md b/COMPILING.md
index 1be09214..496fe49c 100644
--- a/COMPILING.md
+++ b/COMPILING.md
@@ -55,9 +55,9 @@ several systems.
### Debian based systems
As of 2018/Feb/22, librsvg cannot be built in `debian stable` and
-`ubuntu 16.04`, as they have packages that are too old.
+`ubuntu 18.04`, as they have packages that are too old.
-**Build dependencies on Debian Testing or Ubuntu 18.04+:**
+**Build dependencies on Debian Testing or Ubuntu 18.10:**
```sh
apt-get install -y gcc make rustc cargo \
diff --git a/NEWS b/NEWS
index e59d7e56..47eff930 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,9 @@
+Version 2.44.1
+- This is a brown paper bag release! Apologies for the big bug:
+- Fix #325 - All the elements were being leaked at the toplevel.
+- Fix #326 - Fix COMPILING.md - librsvg 2.44 does not build on Ubuntu
+ 18.04 because it has a rust version that is too old.
+
Version 2.44.0
- Librsvg now has minimal logging for debugging by setting the
RSVG_LOG environment variable. See CONTRIBUTING.md for details.
diff --git a/librsvg/rsvg-handle.c b/librsvg/rsvg-handle.c
index fe14a564..790b7e70 100644
--- a/librsvg/rsvg-handle.c
+++ b/librsvg/rsvg-handle.c
@@ -1166,9 +1166,11 @@ get_node_ink_rect(RsvgHandle *handle, RsvgNode *node, cairo_rectangle_t *ink_rec
gboolean
rsvg_handle_get_dimensions_sub (RsvgHandle * handle, RsvgDimensionData * dimension_data, const char *id)
{
+ RsvgNode *root = NULL;
RsvgNode *node;
gboolean has_size;
int root_width, root_height;
+ gboolean res = FALSE;
g_return_val_if_fail (handle, FALSE);
g_return_val_if_fail (dimension_data, FALSE);
@@ -1178,27 +1180,31 @@ rsvg_handle_get_dimensions_sub (RsvgHandle * handle, RsvgDimensionData * dimensi
if (handle->priv->tree == NULL)
return FALSE;
+ root = rsvg_tree_get_root (handle->priv->tree);
+
if (id && *id) {
node = rsvg_defs_lookup (handle->priv->defs, id);
if (rsvg_tree_is_root (handle->priv->tree, node))
id = NULL;
} else {
- node = rsvg_tree_get_root (handle->priv->tree);
+ node = root;
}
- if (!node && id)
- return FALSE;
+ if (!node && id) {
+ goto out;
+ }
- has_size = rsvg_node_svg_get_size (rsvg_tree_get_root (handle->priv->tree),
+ has_size = rsvg_node_svg_get_size (root,
handle->priv->dpi_x, handle->priv->dpi_y,
&root_width, &root_height);
if (id || !has_size) {
cairo_rectangle_t ink_rect;
- if (!get_node_ink_rect (handle, node, &ink_rect))
- return FALSE;
+ if (!get_node_ink_rect (handle, node, &ink_rect)) {
+ goto out;
+ }
dimension_data->width = ink_rect.width;
dimension_data->height = ink_rect.height;
@@ -1214,7 +1220,13 @@ rsvg_handle_get_dimensions_sub (RsvgHandle * handle, RsvgDimensionData * dimensi
(*handle->priv->size_func) (&dimension_data->width, &dimension_data->height,
handle->priv->user_data);
- return TRUE;
+ res = TRUE;
+
+out:
+
+ g_clear_pointer (&root, rsvg_node_unref);
+
+ return res;
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]