Issue #14799: sync source and filtered container freeze count at creation.
This one was happening very rarely, which made it hard to track, though I think it would happen more frequently to people with a lot of fonts (and therefore font loading would take a lot of time) since the problematic situation occured when the thread callback gimp_font_factory_load_async_callback() would run after the corresponding tagged container was created in constructor gimp_data_factory_view_constructor(). When this happened, the source and filtered containers were not synchronized regarding their freeze count. And in particular, the filtered container would have one less freeze and would try to thaw once the thread callback ran and thaw the source container, which was provoking the CRITICAL.
This commit is contained in:
parent
cb552d3dc0
commit
8f9b742b51
1 changed files with 6 additions and 0 deletions
|
|
@ -188,12 +188,18 @@ gimp_filtered_container_set_property (GObject *object,
|
|||
GParamSpec *pspec)
|
||||
{
|
||||
GimpFilteredContainer *filtered_container = GIMP_FILTERED_CONTAINER (object);
|
||||
gint freeze_count;
|
||||
|
||||
switch (property_id)
|
||||
{
|
||||
case PROP_SRC_CONTAINER:
|
||||
filtered_container->src_container = g_value_dup_object (value);
|
||||
|
||||
freeze_count = gimp_container_freeze_count (filtered_container->src_container);
|
||||
while (freeze_count-- > 0)
|
||||
gimp_filtered_container_src_freeze (filtered_container->src_container,
|
||||
filtered_container);
|
||||
|
||||
g_signal_connect (filtered_container->src_container, "notify::sort-func",
|
||||
G_CALLBACK (gimp_filtered_container_src_sort_func),
|
||||
filtered_container);
|
||||
|
|
|
|||
Loading…
Reference in a new issue