[gnome-builder] git: check for NULL message body



commit 2966da99d808a20449d91dc22a77767ddc4c9281
Author: Christian Hergert <chergert redhat com>
Date:   Mon Feb 11 14:32:49 2019 -0800

    git: check for NULL message body

 src/plugins/git/gbp-git-remote-callbacks.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/git/gbp-git-remote-callbacks.c b/src/plugins/git/gbp-git-remote-callbacks.c
index ce5dbec79..d9d8feba3 100644
--- a/src/plugins/git/gbp-git-remote-callbacks.c
+++ b/src/plugins/git/gbp-git-remote-callbacks.c
@@ -174,8 +174,11 @@ gbp_git_remote_callbacks_finalize (GObject *object)
 
   g_clear_object (&self->progress);
 
-  g_string_free (self->body, TRUE);
-  self->body = NULL;
+  if (self->body != NULL)
+    {
+      g_string_free (self->body, TRUE);
+      self->body = NULL;
+    }
 
   G_OBJECT_CLASS (gbp_git_remote_callbacks_parent_class)->finalize (object);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]