[gnome-builder] context: fix unloading context with zero buffers loaded
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] context: fix unloading context with zero buffers loaded
- Date: Mon, 30 Mar 2015 20:56:50 +0000 (UTC)
commit 3b45de4a6861c0c45559efb9d2ef076403c70a1a
Author: Christian Hergert <christian hergert me>
Date: Mon Mar 30 13:55:13 2015 -0700
context: fix unloading context with zero buffers loaded
libide/ide-context.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/libide/ide-context.c b/libide/ide-context.c
index 31867e5..e3e13d9 100644
--- a/libide/ide-context.c
+++ b/libide/ide-context.c
@@ -1307,6 +1307,13 @@ ide_context_unload_buffer_manager (gpointer source_object,
buffers = ide_buffer_manager_get_buffers (self->buffer_manager);
task = g_task_new (self, cancellable, callback, user_data);
+
+ if (buffers->len == 0)
+ {
+ g_task_return_boolean (task, TRUE);
+ return;
+ }
+
g_object_set_data (G_OBJECT (task), "IN_PROGRESS", GINT_TO_POINTER (buffers->len));
for (i = 0; i < buffers->len; i++)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]