[anjuta/gnome-3-6] python: Fix crash during auto-indentation



commit 8898e05cb558a30e63d0a3dfc4be524aaa2aa70b
Author: Johannes Schmid <jhs gnome org>
Date:   Sat Nov 17 14:46:13 2012 +0100

    python: Fix crash during auto-indentation

 plugins/language-support-python/python-assist.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/plugins/language-support-python/python-assist.c b/plugins/language-support-python/python-assist.c
index 5eba7ac..8379c5e 100644
--- a/plugins/language-support-python/python-assist.c
+++ b/plugins/language-support-python/python-assist.c
@@ -315,19 +315,18 @@ on_autocomplete_finished (AnjutaLauncher* launcher,
 					suggestions = g_list_prepend (suggestions, tag);
 				}
 				else
-					g_free (tag);
+					anjuta_language_proposal_data_free (tag);
 			}
 			g_match_info_free (match_info);
 		}
 
 		g_regex_unref (regex);
-		
-		assist->priv->completion_cache = g_completion_new (completion_function);
-		g_completion_add_items (assist->priv->completion_cache, suggestions);
-		
 		g_strfreev (completions);
 		g_string_free (assist->priv->rope_cache, TRUE);
 		assist->priv->rope_cache = NULL;
+		
+		assist->priv->completion_cache = g_completion_new (completion_function);
+		g_completion_add_items (assist->priv->completion_cache, suggestions);
 		g_list_free (suggestions);
 
 		/* Show autocompletion */



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