@LarsGit223 commented on this pull request.


In src/build.c:

> @@ -2291,6 +2291,22 @@ static void build_load_menu_grp(GKeyFile *config, GeanyBuildCommand **dst, gint
 }
 
 
+/* set GeanyBuildCommand if it doesn't already exist and there is a command */
+static void assign_cmd(GeanyBuildCommand *type, guint id,
+		const gchar *label, gchar *value)
+{
+	if (!EMPTY(value) && ! type[GBO_TO_CMD(id)].exists)
+	{
+		type[GBO_TO_CMD(id)].exists = TRUE;
+		SETPTR(type[GBO_TO_CMD(id)].label, g_strdup(label));
+		SETPTR(type[GBO_TO_CMD(id)].command, value);
+		SETPTR(type[GBO_TO_CMD(id)].working_dir, NULL);
+		type[GBO_TO_CMD(id)].old = TRUE;
+	}
+	else
+		g_free(value);

I know it was not in the original code but I would like brackets around the else branch even if it's just one line.


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