[Github-comments] [geany/geany] build.c: Fix memory leak & make some small refactorings (#2271)

Matthew Brush notifications at xxxxx
Thu Aug 29 23:50:29 UTC 2019


codebrainz commented on this pull request.



> @@ -1547,25 +1542,17 @@ static void set_stop_button(gboolean stop)
 	GtkToolButton *run_button;
 
 	run_button = GTK_TOOL_BUTTON(toolbar_get_widget_by_name("Run"));
-	if (run_button != NULL)
-		button_stock_id = gtk_tool_button_get_stock_id(run_button);
+	if (!run_button) return;

More or less: [Line break](https://github.com/geany/geany/blob/0ce5d5484e39edc25bc996cc0bf01f5bdc2b5221/HACKING#L274), and [operator spacing](https://github.com/geany/geany/blob/0ce5d5484e39edc25bc996cc0bf01f5bdc2b5221/HACKING#L269) (although it says two operand) but also [fit in with existing code](https://github.com/geany/geany/blob/0ce5d5484e39edc25bc996cc0bf01f5bdc2b5221/HACKING#L278), for example [here](https://github.com/geany/geany/pull/2271/files#diff-8ae5a6e4e9368d91c0c59edbde1627c2R791) and [here](https://github.com/geany/geany/pull/2271/files#diff-8ae5a6e4e9368d91c0c59edbde1627c2R1550) in nearby code (counter example [here](https://github.com/geany/geany/pull/2271/files#diff-8ae5a6e4e9368d91c0c59edbde1627c2R830))

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2271#discussion_r319314161
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20190829/66d1679e/attachment.html>


More information about the Github-comments mailing list