Commit 8f366bef authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

don't dereference gimp->current_plug_in->plug_in_def if it's NULL. Fixes

2004-08-09  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/plug-ins.c
	(plug_ins_file_register_magic)
	(plug_ins_file_register_mime): don't dereference
	gimp->current_plug_in->plug_in_def if it's NULL.
	Fixes bug #149678.

	(plug_ins_file_register_mime): moved returning the proc_def inside
	the right if() statement.
parent 00e8541e
2004-08-09 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-ins.c
(plug_ins_file_register_magic)
(plug_ins_file_register_mime): don't dereference
gimp->current_plug_in->plug_in_def if it's NULL.
Fixes bug #149678.
(plug_ins_file_register_mime): moved returning the proc_def inside
the right if() statement.
2004-08-09 Hans Breuer <hans@breuer.org>
* app/core/gimp-edit.c(gimp_edit_paste_as_new) :
......
......@@ -431,7 +431,7 @@ plug_ins_file_register_magic (Gimp *gimp,
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
g_return_val_if_fail (name != NULL, NULL);
if (gimp->current_plug_in)
if (gimp->current_plug_in && gimp->current_plug_in->plug_in_def)
list = gimp->current_plug_in->plug_in_def->proc_defs;
else
list = gimp->plug_in_proc_defs;
......@@ -490,7 +490,7 @@ plug_ins_file_register_mime (Gimp *gimp,
g_return_val_if_fail (name != NULL, NULL);
g_return_val_if_fail (mime_type != NULL, NULL);
if (gimp->current_plug_in)
if (gimp->current_plug_in && gimp->current_plug_in->plug_in_def)
list = gimp->current_plug_in->plug_in_def->proc_defs;
else
list = gimp->plug_in_proc_defs;
......@@ -504,9 +504,9 @@ plug_ins_file_register_mime (Gimp *gimp,
if (proc_def->mime_type)
g_free (proc_def->mime_type);
proc_def->mime_type = g_strdup (mime_type);
}
return proc_def;
return proc_def;
}
}
return NULL;
......
......@@ -431,7 +431,7 @@ plug_ins_file_register_magic (Gimp *gimp,
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
g_return_val_if_fail (name != NULL, NULL);
if (gimp->current_plug_in)
if (gimp->current_plug_in && gimp->current_plug_in->plug_in_def)
list = gimp->current_plug_in->plug_in_def->proc_defs;
else
list = gimp->plug_in_proc_defs;
......@@ -490,7 +490,7 @@ plug_ins_file_register_mime (Gimp *gimp,
g_return_val_if_fail (name != NULL, NULL);
g_return_val_if_fail (mime_type != NULL, NULL);
if (gimp->current_plug_in)
if (gimp->current_plug_in && gimp->current_plug_in->plug_in_def)
list = gimp->current_plug_in->plug_in_def->proc_defs;
else
list = gimp->plug_in_proc_defs;
......@@ -504,9 +504,9 @@ plug_ins_file_register_mime (Gimp *gimp,
if (proc_def->mime_type)
g_free (proc_def->mime_type);
proc_def->mime_type = g_strdup (mime_type);
}
return proc_def;
return proc_def;
}
}
return NULL;
......
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