app: explicitly clear GUI when halting a filter toolec80a885139ac60de83cf1e785da2a68165d576f
commitec80a885139ac60de83cf1e785da2a68165d576f
authorEll <ell_se@yahoo.com>
Mon, 20 Aug 2018 18:21:11 +0000 (20 14:21 -0400)
committerEll <ell_se@yahoo.com>
Mon, 20 Aug 2018 18:41:06 +0000 (20 14:41 -0400)
treea4812816f82f5eae4e8a385a2814282ff08f685e
parentfd64aae47bc6a61ec49c571771b1dad587ba446a
app: explicitly clear GUI when halting a filter tool

In gimp_filter_tool_halt(), explicitly clear the GUI container
before clearing filter_tool->config, since the tool might be halted
during the GUI dialog's delete event, in which case the GUI will
only be implicitly destroyed *after* the function returns.  The
destruction of the GUI might fire signals whose handlers rely on
filter_tool->config, so we need to make sure it happens while it's
still alive.

In particular, this fixes a CRITICAL in the threshold tool, which
occurs due to the histogram view's "range-changhed" signal being
fired during its destruction, and its handler accessing
filter_tool->config.
app/tools/gimpfiltertool.c