[gnome-builder/wip/libide] libide: save makecache upon successful creation



commit a527245a52d290e099ea11d6e9be9bf4592a020a
Author: Christian Hergert <christian hergert me>
Date:   Sun Mar 1 22:55:40 2015 -0800

    libide: save makecache upon successful creation

 libide/autotools/ide-autotools-build-system.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/libide/autotools/ide-autotools-build-system.c b/libide/autotools/ide-autotools-build-system.c
index e636c45..a82add4 100644
--- a/libide/autotools/ide-autotools-build-system.c
+++ b/libide/autotools/ide-autotools-build-system.c
@@ -303,6 +303,9 @@ ide_autotools_build_system__makecache_new_cb (GObject      *object,
 
   g_assert (G_IS_TASK (task));
 
+  self = g_task_get_source_object (task);
+  priv = ide_autotools_build_system_get_instance_private (self);
+
   makecache = ide_makecache_new_for_makefile_finish (result, &error);
 
   if (!makecache)
@@ -311,13 +314,12 @@ ide_autotools_build_system__makecache_new_cb (GObject      *object,
       return;
     }
 
+  priv->makecache = g_object_ref (makecache);
+
   /*
    * Complete all of the pending tasks in flight.
    */
 
-  self = g_task_get_source_object (task);
-  priv = ide_autotools_build_system_get_instance_private (self);
-
   tasks = priv->makecache_tasks;
   priv->makecache_tasks = g_ptr_array_new ();
   priv->makecache_in_progress = FALSE;


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