Commit b622e0b1 authored by William Skaggs's avatar William Skaggs

Bill Skaggs <weskaggs@primate.ucdavis.edu>

	* plug-ins/common/spheredesigner.c: add basic validity check
	when attempting to open a preset; let's say this fixes
	bug #148984.
parent 0429d049
2005-01-17 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* plug-ins/common/spheredesigner.c: add basic validity check
when attempting to open a preset; let's say this fixes
bug #148984.
2005-01-17 Michael Natterer <mitch@gimp.org>
Allow to drop stuff onto empty layers, channels and paths dialogs
......
......@@ -1981,17 +1981,28 @@ loadit (const gchar * fn)
gchar line[1024];
gint i;
texture *t;
s.com.numtexture = 0;
gint majtype, type;
f = fopen (fn, "rt");
if (!f)
if (! f)
{
g_message (_("Could not open '%s' for reading: %s"),
gimp_filename_to_utf8 (fn), g_strerror (errno));
return;
}
if (2 != fscanf (f, "%d %d", &majtype, &type) || majtype < 0 || majtype > 2)
{
g_message (_("File '%s' is not a valid save file."),
gimp_filename_to_utf8 (fn));
fclose (f);
return;
}
rewind (f);
s.com.numtexture = 0;
while (!feof (f))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment