[anjuta] language-support-cpp-java: Remove a critical warning when Anjuta is closed
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] language-support-cpp-java: Remove a critical warning when Anjuta is closed
- Date: Sat, 22 Feb 2014 21:00:18 +0000 (UTC)
commit b093ba4454cec56a2d3adcab40b4c6f5f9fff2d2
Author: Sébastien Granjoux <seb sfo free fr>
Date: Sat Feb 22 19:29:15 2014 +0100
language-support-cpp-java: Remove a critical warning when Anjuta is closed
plugins/language-support-cpp-java/cpp-packages.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/plugins/language-support-cpp-java/cpp-packages.c
b/plugins/language-support-cpp-java/cpp-packages.c
index 3c4cb69..131c5a4 100644
--- a/plugins/language-support-cpp-java/cpp-packages.c
+++ b/plugins/language-support-cpp-java/cpp-packages.c
@@ -403,10 +403,15 @@ cpp_packages_finalize (GObject* object)
{
CppPackages *packages = CPP_PACKAGES (object);
AnjutaShell* shell = packages->plugin->shell;
- IAnjutaProjectManager* pm =
- anjuta_shell_get_interface (shell, IAnjutaProjectManager, NULL);
- g_signal_handlers_disconnect_by_func (pm, cpp_packages_load_real, packages);
+ if (shell != NULL)
+ {
+ IAnjutaProjectManager* pm =
+ anjuta_shell_get_interface (shell, IAnjutaProjectManager, NULL);
+
+ if (pm != NULL)
+ 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]