[librsvg] rsvg-convert: Catch the case where the SVG has no dimensions
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] rsvg-convert: Catch the case where the SVG has no dimensions
- Date: Fri, 24 May 2019 00:39:19 +0000 (UTC)
commit 8058ebef6dae3cf26f6995acd2078b2d1159d8db
Author: Federico Mena Quintero <federico gnome org>
Date: Thu May 23 19:38:54 2019 -0500
rsvg-convert: Catch the case where the SVG has no dimensions
rsvg-convert.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/rsvg-convert.c b/rsvg-convert.c
index 78054523..2df9546a 100644
--- a/rsvg-convert.c
+++ b/rsvg-convert.c
@@ -417,6 +417,11 @@ main (int argc, char **argv)
exit (1);
}
+ if (dimensions.width == 0 || dimensions.height == 0) {
+ g_printerr ("The SVG %s has no dimensions\n", args[i]);
+ exit (1);
+ }
+
unscaled_width = dimensions.width;
unscaled_height = dimensions.height;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]