[anjuta/gnome-3-4] cxxparser: improved code checks to avoid leaks.
- From: Johannes Schmid <jhs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta/gnome-3-4] cxxparser: improved code checks to avoid leaks.
- Date: Sat, 28 Jul 2012 09:51:52 +0000 (UTC)
commit fc781eab10a10f415bc3ae471a70a88b7dd3a203
Author: Massimo Corà <mcora src gnome org>
Date: Sat Jul 14 11:47:31 2012 +0200
cxxparser: improved code checks to avoid leaks.
.../cxxparser/engine-parser.cpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/plugins/language-support-cpp-java/cxxparser/engine-parser.cpp b/plugins/language-support-cpp-java/cxxparser/engine-parser.cpp
index e80fb8b..9817a5e 100644
--- a/plugins/language-support-cpp-java/cxxparser/engine-parser.cpp
+++ b/plugins/language-support-cpp-java/cxxparser/engine-parser.cpp
@@ -249,9 +249,11 @@ EngineParser::getNearestClassInCurrentScopeChainByFileLine (const char* full_fil
ianjuta_symbol_query_search_parent_scope (_query_parent_scope,
node, NULL);
- if (ianjuta_symbol_get_int (IANJUTA_SYMBOL (iter), IANJUTA_SYMBOL_FIELD_ID, NULL) ==
+ if (parent_iter &&
+ ianjuta_symbol_get_int (IANJUTA_SYMBOL (iter), IANJUTA_SYMBOL_FIELD_ID, NULL) ==
ianjuta_symbol_get_int (IANJUTA_SYMBOL (parent_iter), IANJUTA_SYMBOL_FIELD_ID, NULL))
{
+ g_object_unref (parent_iter);
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]