[gnome-builder] ide-build-system: fix possible use of uninitialized self
- From: Sébastien Lafargue <slafargue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] ide-build-system: fix possible use of uninitialized self
- Date: Mon, 7 Nov 2016 12:49:14 +0000 (UTC)
commit 9ad218eb7fd39456025601ff8149035921dd9191
Author: Sebastien Lafargue <slafargue gnome org>
Date: Mon Nov 7 13:46:50 2016 +0100
ide-build-system: fix possible use of uninitialized self
libide/buildsystem/ide-build-manager.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/libide/buildsystem/ide-build-manager.c b/libide/buildsystem/ide-build-manager.c
index a71ca27..3b25287 100644
--- a/libide/buildsystem/ide-build-manager.c
+++ b/libide/buildsystem/ide-build-manager.c
@@ -570,7 +570,7 @@ ide_build_manager_build_save_all_cb (GObject *object,
g_autoptr(IdeBuildResult) build_result = NULL;
g_autoptr(GError) error = NULL;
g_autoptr(GTask) task = user_data;
- IdeBuildManager *self;
+ IdeBuildManager *self = NULL;
GCancellable *cancellable;
BuildState *state;
@@ -606,8 +606,11 @@ ide_build_manager_build_save_all_cb (GObject *object,
ide_build_manager_set_build_result (self, build_result);
failure:
- self->saving = FALSE;
- g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_BUSY]);
+ if (self != NULL)
+ {
+ self->saving = FALSE;
+ g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_BUSY]);
+ }
IDE_EXIT;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]