[gnome-builder] workbench: Do not abort on failed precondition in public function



commit f0e5a81aea897088ed0842505a0de3e16acbd545
Author: Krzesimir Nowak <krzesimir kinvolk io>
Date:   Thu Mar 9 11:50:57 2017 +0100

    workbench: Do not abort on failed precondition in public function
    
    It was aborting gnome-shell, when downloading the flatpak failed.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=779802

 libide/workbench/ide-workbench-open.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libide/workbench/ide-workbench-open.c b/libide/workbench/ide-workbench-open.c
index 6e31342..b68fe44 100644
--- a/libide/workbench/ide-workbench-open.c
+++ b/libide/workbench/ide-workbench-open.c
@@ -484,9 +484,9 @@ ide_workbench_open_project_async (IdeWorkbench        *self,
 {
   g_autoptr(GTask) task = NULL;
 
-  g_assert (IDE_IS_WORKBENCH (self));
-  g_assert (G_IS_FILE (file_or_directory));
-  g_assert (!cancellable || G_IS_CANCELLABLE (cancellable));
+  g_return_if_fail (IDE_IS_WORKBENCH (self));
+  g_return_if_fail (G_IS_FILE (file_or_directory));
+  g_return_if_fail (!cancellable || G_IS_CANCELLABLE (cancellable));
 
   task = g_task_new (self, cancellable, callback, user_data);
 


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