gimp/gimp-2.10.0-fix-svg-reading.patch
2019-07-31 09:51:59 +02:00

40 lines
1.3 KiB
Diff

diff --git a/plug-ins/common/file-svg.c b/plug-ins/common/file-svg.c
index 570b3632b18e7a663b6ef2b0110941f64123720e..9f3de881d187406fabbc913ee8543a8fee83dcc7 100644
--- a/plug-ins/common/file-svg.c
+++ b/plug-ins/common/file-svg.c
@@ -521,19 +521,24 @@ load_rsvg_size (const gchar *filename,
break;
case G_IO_STATUS_EOF:
success = rsvg_handle_close (handle, error);
- break;
- case G_IO_STATUS_NORMAL:
- success = rsvg_handle_write (handle,
- (const guchar *) buf, len, error);
- rsvg_handle_get_dimensions (handle, &dim);
- if (dim.width > 0 && dim.height > 0)
+ if (success)
{
- vals->width = dim.width;
- vals->height = dim.height;
+ rsvg_handle_get_dimensions (handle, &dim);
+
+ if (dim.width > 0 && dim.height > 0)
+ {
+ vals->width = dim.width;
+ vals->height = dim.height;
- done = TRUE;
+ done = TRUE;
+ }
}
+
+ break;
+ case G_IO_STATUS_NORMAL:
+ success = rsvg_handle_write (handle,
+ (const guchar *) buf, len, error);
break;
case G_IO_STATUS_AGAIN:
break;