[gnome-builder] object: add fallback to ensure we have a valid GError
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] object: add fallback to ensure we have a valid GError
- Date: Tue, 20 Jun 2017 01:00:11 +0000 (UTC)
commit 2504cd24acdd8bd25cf26eed62687fbc707fb9cc
Author: Christian Hergert <chergert redhat com>
Date: Mon Jun 19 17:58:51 2017 -0700
object: add fallback to ensure we have a valid GError
libide/ide-object.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/libide/ide-object.c b/libide/ide-object.c
index 8e84158..56aeaad 100644
--- a/libide/ide-object.c
+++ b/libide/ide-object.c
@@ -367,6 +367,12 @@ extension_init_cb (GObject *object,
if (!g_async_initable_init_finish (initable, result, &error))
{
+ if (error == NULL)
+ error = g_error_new (G_IO_ERROR,
+ G_IO_ERROR_FAILED,
+ "Unknown error while initializing %s",
+ G_OBJECT_TYPE_NAME (initable));
+
IDE_TRACE_MSG ("extension for %s failed to initialize: %s",
G_OBJECT_TYPE_NAME (initable), error->message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]