[Rawstudio-commit] r2366 - branches/rawstudio-1.2/src

Anders Kvist anders at kvistmail.dk
Thu Apr 9 20:15:18 CEST 2009


Author: akv
Date: 2009-04-09 20:15:18 +0200 (Thu, 09 Apr 2009)
New Revision: 2366

Modified:
   branches/rawstudio-1.2/src/rs-external-editor.c
Log:
Merged: 2365.

Modified: branches/rawstudio-1.2/src/rs-external-editor.c
===================================================================
--- branches/rawstudio-1.2/src/rs-external-editor.c	2009-04-09 18:14:26 UTC (rev 2365)
+++ branches/rawstudio-1.2/src/rs-external-editor.c	2009-04-09 18:15:18 UTC (rev 2366)
@@ -61,7 +61,10 @@
 	reply = dbus_connection_send_with_reply_and_block (bus, message, -1, NULL);
 
 	if (!reply) {
-		system("gimp &");
+		gint retval = system("gimp &");
+		if (retval != 0)
+			g_warning("system(\"gimp &\") returned: %d\n", retval);
+
 		gint i = 0;
 
 		// FIXME: We need to sleep a bit with GIMP 2.6 as it doesn't wait until it has opened the photo before it replies...
@@ -100,7 +103,11 @@
 	gboolean retval = FALSE;
 
 	fp = popen("gimp -v","r");
-	fgets( line, sizeof line, fp);
+	if (fgets( line, sizeof line, fp) == NULL)
+	{
+		g_warning("fgets returned: %d\n", retval);
+		return FALSE;
+	}
 	pclose(fp);
 
 #if GLIB_CHECK_VERSION(2,14,0)




More information about the Rawstudio-commit mailing list