@ntrel commented on this pull request.


In src/build.c:

> @@ -2577,15 +2565,20 @@ void build_save_menu(GKeyFile *config, gpointer ptr, GeanyBuildSource src)
 				g_key_file_remove_key(config, build_grp_name, "error_regex", NULL);
 			if (pj->priv->build_filetypes_list != NULL)
 			{
-				data.config = config;
-				data.ft_names = g_ptr_array_new();
-				g_ptr_array_foreach(pj->priv->build_filetypes_list, foreach_project_filetype, (gpointer)(&data));
-				if (data.ft_names->pdata != NULL)
+				GPtrArray *ft_names = g_ptr_array_new();
+				guint i;
+				
+				foreach_ptr_array(ft, i, pj->priv->build_filetypes_list)

what is the reason we keep invalid documents around? If there is a good reason to do that (like not premature optimization)

To avoid reading/writing to freed memory. The API allows people to read from a document pointer in a callback without seeing if they can find the document in documents_array. I don't think this can safely be deprecated, it would cause silent breakage.

but probably located in the document.h file

It already is.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.