[anjuta/system-db-refactor] language-support-cpp-java: Fix crash when queue is free'd while still running
- From: Johannes Schmid <jhs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta/system-db-refactor] language-support-cpp-java: Fix crash when queue is free'd while still running
- Date: Mon, 31 Jan 2011 22:01:23 +0000 (UTC)
commit c9666a2fcb31004c0496159a769ef939b7409811
Author: Johannes Schmid <jhs gnome org>
Date: Mon Jan 31 22:33:45 2011 +0100
language-support-cpp-java: Fix crash when queue is free'd while still running
plugins/language-support-cpp-java/cpp-packages.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/plugins/language-support-cpp-java/cpp-packages.c b/plugins/language-support-cpp-java/cpp-packages.c
index 970e149..0bdd6ad 100644
--- a/plugins/language-support-cpp-java/cpp-packages.c
+++ b/plugins/language-support-cpp-java/cpp-packages.c
@@ -119,7 +119,12 @@ on_package_ready (AnjutaCommand* command,
anjuta_pkg_scanner_get_files (scanner),
NULL);
}
- g_object_unref (command);
+}
+
+static void
+on_queue_finished (AnjutaCommandQueue* queue, gpointer unused)
+{
+ g_object_unref (queue);
}
static void
@@ -152,6 +157,7 @@ cpp_packages_load_real (CppPackages* packages, GError* error, IAnjutaProjectMana
g_list_foreach (packages_to_add, (GFunc) pkg_data_free, NULL);
g_list_free (packages_to_add);
+ g_signal_connect (packages->queue, "finished", G_CALLBACK (on_queue_finished), NULL);
anjuta_command_queue_start (packages->queue);
}
@@ -191,7 +197,6 @@ cpp_packages_finalize (GObject* object)
IAnjutaProjectManager* pm =
anjuta_shell_get_interface (shell, IAnjutaProjectManager, NULL);
- g_object_unref (packages->queue);
g_signal_handlers_disconnect_by_func (pm, cpp_packages_load_real, packages);
G_OBJECT_CLASS (cpp_packages_parent_class)->finalize (object);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]