[gegl] svg-load: avoid crashing on error without gerror set
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] svg-load: avoid crashing on error without gerror set
- Date: Sun, 12 Mar 2017 19:50:09 +0000 (UTC)
commit 0fb072e0c853d133d596ec0a1a18049a71eaefbc
Author: Øyvind Kolås <pippin gimp org>
Date: Sun Mar 12 20:49:43 2017 +0100
svg-load: avoid crashing on error without gerror set
operations/external/svg-load.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/operations/external/svg-load.c b/operations/external/svg-load.c
index cce7c54..1215555 100644
--- a/operations/external/svg-load.c
+++ b/operations/external/svg-load.c
@@ -162,8 +162,11 @@ prepare (GeglOperation *operation)
stream = gegl_gio_open_input_stream (o->uri, o->path, &p->file, &error);
if (stream == NULL)
{
- g_warning ("%s", error->message);
- g_error_free (error);
+ if (error)
+ {
+ g_warning ("%s", error->message);
+ g_error_free (error);
+ }
cleanup (operation);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]