[anjuta] python: Fix crash during auto-indentation



commit 60456bc51e09b0b3c78b5264326fe52118a3ea5d
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]