bail out nicely instead of aborting when saving fails.

* plug-ins/sgi/sgi.c: bail out nicely instead of aborting when
        saving fails.

--Sven
This commit is contained in:
Sven Neumann
1999-11-27 02:54:25 +00:00
parent 187231cbf7
commit bf025c2701
2 changed files with 16 additions and 4 deletions

View File

@ -1,3 +1,8 @@
Sat Nov 27 03:51:41 MET 1999
* plug-ins/sgi/sgi.c: bail out nicely instead of aborting when
saving fails.
Sat Nov 27 03:07:20 CET 1999 Marc Lehmann <pcg@goof.com> Sat Nov 27 03:07:20 CET 1999 Marc Lehmann <pcg@goof.com>
* configure.in: Fix *the* perl configuration bug. tststs... * configure.in: Fix *the* perl configuration bug. tststs...

View File

@ -34,6 +34,12 @@
* Revision History: * Revision History:
* *
* $Log$ * $Log$
* Revision 1.15 1999/11/27 02:54:25 neo
* * plug-ins/sgi/sgi.c: bail out nicely instead of aborting when
* saving fails.
*
* --Sven
*
* Revision 1.14 1999/11/26 20:58:26 neo * Revision 1.14 1999/11/26 20:58:26 neo
* more action_area beautifiction * more action_area beautifiction
* *
@ -659,7 +665,8 @@ save_image (char *filename, /* I - File to save to */
zsize = 4; zsize = 4;
break; break;
default: default:
g_error ("Image must be of type RGB or GRAY\n"); g_warning ("Image must be of type RGB or GRAY\n");
return FALSE;
break; break;
}; };
@ -671,8 +678,8 @@ save_image (char *filename, /* I - File to save to */
drawable->height, zsize); drawable->height, zsize);
if (sgip == NULL) if (sgip == NULL)
{ {
g_print("can't create image file\n"); g_warning ("can't create image file\n");
gimp_quit(); return FALSE;
}; };
if (strrchr(filename, '/') != NULL) if (strrchr(filename, '/') != NULL)
@ -744,7 +751,7 @@ save_image (char *filename, /* I - File to save to */
g_free(rows[0]); g_free(rows[0]);
g_free(rows); g_free(rows);
return (1); return TRUE;
} }