From fe4acfa4ed700615400aec65c81fc1f302ed9666 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Mon, 11 Dec 2000 17:15:29 +0000 Subject: [PATCH] use the correct pointer when dumping gradients to stderr in case of 2000-12-11 Sven Neumann * app/gradient.c: use the correct pointer when dumping gradients to stderr in case of problems. Sort of fixes bug #31510. --- ChangeLog | 5 +++++ app/gradient.c | 5 ++++- app/gradient_editor.c | 5 ++++- app/gui/gradient-editor.c | 5 ++++- app/widgets/gimpgradienteditor.c | 5 ++++- 5 files changed, 21 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6ee56ccf70..7fbf4f52c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-12-11 Sven Neumann + + * app/gradient.c: use the correct pointer when dumping gradients to + stderr in case of problems. Sort of fixes bug #31510. + 2000-12-11 Sven Neumann * app/gimphistogram.c (gimp_histogram_calculate_sub_region): diff --git a/app/gradient.c b/app/gradient.c index a57ad6bd4e..8c4305f5b7 100644 --- a/app/gradient.c +++ b/app/gradient.c @@ -5939,6 +5939,9 @@ grad_dump_gradient (gradient_t *grad, { grad_segment_t *seg; + g_return_if_fail (grad != NULL); + g_return_if_fail (file != NULL); + fprintf (file, "Name: \"%s\"\n", grad->name); fprintf (file, "Dirty: %d\n", grad->dirty); fprintf (file, "Filename: \"%s\"\n", grad->filename); @@ -6045,7 +6048,7 @@ seg_get_segment_at (gradient_t *grad, } /* Oops: we should have found a segment, but we didn't */ - grad_dump_gradient (curr_gradient, stderr); + grad_dump_gradient (grad, stderr); gimp_fatal_error ("seg_get_segment_at(): " "No matching segment for position %0.15f", pos); diff --git a/app/gradient_editor.c b/app/gradient_editor.c index a57ad6bd4e..8c4305f5b7 100644 --- a/app/gradient_editor.c +++ b/app/gradient_editor.c @@ -5939,6 +5939,9 @@ grad_dump_gradient (gradient_t *grad, { grad_segment_t *seg; + g_return_if_fail (grad != NULL); + g_return_if_fail (file != NULL); + fprintf (file, "Name: \"%s\"\n", grad->name); fprintf (file, "Dirty: %d\n", grad->dirty); fprintf (file, "Filename: \"%s\"\n", grad->filename); @@ -6045,7 +6048,7 @@ seg_get_segment_at (gradient_t *grad, } /* Oops: we should have found a segment, but we didn't */ - grad_dump_gradient (curr_gradient, stderr); + grad_dump_gradient (grad, stderr); gimp_fatal_error ("seg_get_segment_at(): " "No matching segment for position %0.15f", pos); diff --git a/app/gui/gradient-editor.c b/app/gui/gradient-editor.c index a57ad6bd4e..8c4305f5b7 100644 --- a/app/gui/gradient-editor.c +++ b/app/gui/gradient-editor.c @@ -5939,6 +5939,9 @@ grad_dump_gradient (gradient_t *grad, { grad_segment_t *seg; + g_return_if_fail (grad != NULL); + g_return_if_fail (file != NULL); + fprintf (file, "Name: \"%s\"\n", grad->name); fprintf (file, "Dirty: %d\n", grad->dirty); fprintf (file, "Filename: \"%s\"\n", grad->filename); @@ -6045,7 +6048,7 @@ seg_get_segment_at (gradient_t *grad, } /* Oops: we should have found a segment, but we didn't */ - grad_dump_gradient (curr_gradient, stderr); + grad_dump_gradient (grad, stderr); gimp_fatal_error ("seg_get_segment_at(): " "No matching segment for position %0.15f", pos); diff --git a/app/widgets/gimpgradienteditor.c b/app/widgets/gimpgradienteditor.c index a57ad6bd4e..8c4305f5b7 100644 --- a/app/widgets/gimpgradienteditor.c +++ b/app/widgets/gimpgradienteditor.c @@ -5939,6 +5939,9 @@ grad_dump_gradient (gradient_t *grad, { grad_segment_t *seg; + g_return_if_fail (grad != NULL); + g_return_if_fail (file != NULL); + fprintf (file, "Name: \"%s\"\n", grad->name); fprintf (file, "Dirty: %d\n", grad->dirty); fprintf (file, "Filename: \"%s\"\n", grad->filename); @@ -6045,7 +6048,7 @@ seg_get_segment_at (gradient_t *grad, } /* Oops: we should have found a segment, but we didn't */ - grad_dump_gradient (curr_gradient, stderr); + grad_dump_gradient (grad, stderr); gimp_fatal_error ("seg_get_segment_at(): " "No matching segment for position %0.15f", pos);