check data before accessing it to avoid crashing while the dialog is being

2007-01-17  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/curve_bend.c (bender_type_callback): check data
	before accessing it to avoid crashing while the dialog is being
	constructed. Fixes bug #395798.


svn path=/trunk/; revision=21729
This commit is contained in:
Sven Neumann
2007-01-17 11:35:56 +00:00
committed by Sven Neumann
parent f1e1b177c9
commit 3dfb169691
2 changed files with 14 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2007-01-17 Sven Neumann <sven@gimp.org>
* plug-ins/common/curve_bend.c (bender_type_callback): check data
before accessing it to avoid crashing while the dialog is being
constructed. Fixes bug #395798.
2007-01-16 Sven Neumann <sven@gimp.org>
* app/actions/file-commands.c (file_open_dialog_show): use the

View File

@ -1763,9 +1763,9 @@ bender_calculate_curve (BenderDialog *cd,
static void
bender_rotate_adj_callback (GtkAdjustment *adjustment,
gpointer client_data)
gpointer client_data)
{
BenderDialog *cd = (BenderDialog*) client_data;
BenderDialog *cd = (BenderDialog *) client_data;
if (adjustment->value != cd->rotation)
{
@ -1793,7 +1793,11 @@ bender_type_callback (GtkWidget *widget,
BenderDialog *cd;
gimp_radio_button_update (widget, data);
cd = g_object_get_data (G_OBJECT (widget), "cd");
if (! cd)
return;
if (cd->curve_type == SMOOTH)
{
gint i;
@ -1822,10 +1826,8 @@ static void
bender_reset_callback (GtkWidget *widget,
gpointer client_data)
{
BenderDialog *cd;
int i;
cd = (BenderDialog *) client_data;
BenderDialog *cd = (BenderDialog *) client_data;
gint i;
/* Initialize the values */
for (i = 0; i < 256; i++)