summaryrefslogtreecommitdiff
path: root/rsvg-convert.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@gnome.org>2019-05-23 19:38:54 -0500
committerFederico Mena Quintero <federico@gnome.org>2019-05-23 19:38:54 -0500
commit8058ebef6dae3cf26f6995acd2078b2d1159d8db (patch)
tree791f1968fa213b3c5c17b723493dc98f15956402 /rsvg-convert.c
parent696159cfbbf4d8ac38d212b0ebcc6309537b4b8e (diff)
downloadlibrsvg-8058ebef6dae3cf26f6995acd2078b2d1159d8db.tar.gz
rsvg-convert: Catch the case where the SVG has no dimensions
Diffstat (limited to 'rsvg-convert.c')
-rw-r--r--rsvg-convert.c5
1 files changed, 5 insertions, 0 deletions
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;