Commit 35352519 authored by Jehan's avatar Jehan

Bug 793669 - histogram-related bug report.

When the histogram is freed, we need to set valid to FALSE, in order to
force recreation as soon as needed. Otherwise we may hit some race
condition of trying to work with a NULL histogram. For instance this
happened when starting painting fast enough after switching the active
image.
parent 264565e1
......@@ -252,6 +252,7 @@ gimp_histogram_editor_set_property (GObject *object,
if (editor->histogram)
{
g_clear_object (&editor->histogram);
editor->valid = FALSE;
gimp_histogram_view_set_histogram (view, NULL);
}
......@@ -349,6 +350,7 @@ gimp_histogram_editor_set_image (GimpImageEditor *image_editor,
if (editor->histogram)
{
g_clear_object (&editor->histogram);
editor->valid = FALSE;
gimp_histogram_view_set_histogram (view, NULL);
}
......@@ -394,6 +396,7 @@ gimp_histogram_editor_layer_changed (GimpImage *image,
if (editor->histogram)
{
g_clear_object (&editor->histogram);
editor->valid = FALSE;
gimp_histogram_view_set_histogram (view, 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