Author: abrander
Date: 2013-03-30 19:09:23 +0100 (Sat, 30 Mar 2013)
New Revision: 4340
Modified:
trunk/librawstudio/rs-filter.c
Log:
Really check return values in rs_filter_graph().
Modified: trunk/librawstudio/rs-filter.c
===================================================================
--- trunk/librawstudio/rs-filter.c 2013-03-30 17:29:03 UTC (rev 4339)
+++ trunk/librawstudio/rs-filter.c 2013-03-30 18:09:23 UTC (rev 4340)
@@ -758,7 +758,6 @@
void
rs_filter_graph(RSFilter *filter)
{
- gint ignore;
g_assert(RS_IS_FILTER(filter));
GString *str = g_string_new("digraph G {\n");
@@ -767,8 +766,10 @@
g_string_append_printf(str, "}\n");
g_file_set_contents("/tmp/rs-filter-graph", str->str, str->len, NULL);
- ignore = system("dot -Tpng >/tmp/rs-filter-graph.png
</tmp/rs-filter-graph");
- ignore = system("gnome-open /tmp/rs-filter-graph.png");
+ if (0 != system("dot -Tpng >/tmp/rs-filter-graph.png
</tmp/rs-filter-graph"))
+ g_warning("Calling dot failed");
+ if (0 != system("gnome-open /tmp/rs-filter-graph.png"))
+ g_warning("Calling gnome-open failed.");
- g_string_free(str, (ignore == ignore));
+ g_string_free(str, TRUE);
}
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit