another leak: don't allocate the PaintPressureOptions structure twice for

2000-02-24  Michael Natterer  <mitch@gimp.org>

	* app/tool_options.c: another leak: don't allocate the
	PaintPressureOptions structure twice for one tool.
This commit is contained in:
Michael Natterer 2000-02-24 02:11:10 +00:00 committed by Michael Natterer
parent 868888fe21
commit ae38b99c21
4 changed files with 8 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2000-02-24 Michael Natterer <mitch@gimp.org>
* app/tool_options.c: another leak: don't allocate the
PaintPressureOptions structure twice for one tool.
2000-02-24 Michael Natterer <mitch@gimp.org>
* app/datafiles.c: fixed a memleak.

View File

@ -602,7 +602,6 @@ paint_options_init (PaintOptions *options,
break;
}
options->pressure_options = paint_pressure_options_new (tool_type);
if (options->pressure_options->frame)
{
gtk_box_pack_start (GTK_BOX (options->tool_options.main_vbox),
@ -658,7 +657,7 @@ paint_options_reset (PaintOptions *options)
static PaintPressureOptions *
paint_pressure_options_new (ToolType tool_type)
{
PaintPressureOptions *pressure;
PaintPressureOptions *pressure = NULL;
GtkWidget *frame = NULL;
GtkWidget *hbox = NULL;

View File

@ -602,7 +602,6 @@ paint_options_init (PaintOptions *options,
break;
}
options->pressure_options = paint_pressure_options_new (tool_type);
if (options->pressure_options->frame)
{
gtk_box_pack_start (GTK_BOX (options->tool_options.main_vbox),
@ -658,7 +657,7 @@ paint_options_reset (PaintOptions *options)
static PaintPressureOptions *
paint_pressure_options_new (ToolType tool_type)
{
PaintPressureOptions *pressure;
PaintPressureOptions *pressure = NULL;
GtkWidget *frame = NULL;
GtkWidget *hbox = NULL;

View File

@ -602,7 +602,6 @@ paint_options_init (PaintOptions *options,
break;
}
options->pressure_options = paint_pressure_options_new (tool_type);
if (options->pressure_options->frame)
{
gtk_box_pack_start (GTK_BOX (options->tool_options.main_vbox),
@ -658,7 +657,7 @@ paint_options_reset (PaintOptions *options)
static PaintPressureOptions *
paint_pressure_options_new (ToolType tool_type)
{
PaintPressureOptions *pressure;
PaintPressureOptions *pressure = NULL;
GtkWidget *frame = NULL;
GtkWidget *hbox = NULL;