[gnome-builder] buildmanager: simplify build cancelling



commit 78761c5f05e80069eb5aeaae46e82edafcbc1eed
Author: Christian Hergert <chergert redhat com>
Date:   Thu Feb 16 14:16:03 2017 -0800

    buildmanager: simplify build cancelling

 libide/buildsystem/ide-build-manager.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/libide/buildsystem/ide-build-manager.c b/libide/buildsystem/ide-build-manager.c
index e41129a..f50ba03 100644
--- a/libide/buildsystem/ide-build-manager.c
+++ b/libide/buildsystem/ide-build-manager.c
@@ -853,13 +853,12 @@ ide_build_manager_cancel (IdeBuildManager *self)
 
   g_return_if_fail (IDE_IS_BUILD_MANAGER (self));
 
+  g_debug ("Cancelling build due to user request");
+
   cancellable = g_steal_pointer (&self->cancellable);
 
-  if (cancellable != NULL && !g_cancellable_is_cancelled (cancellable))
-    {
-      g_debug ("Cancelling build due to user request");
-      g_cancellable_cancel (cancellable);
-    }
+  if (!g_cancellable_is_cancelled (cancellable))
+    g_cancellable_cancel (cancellable);
 
   IDE_EXIT;
 }


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