Avoid showing UIs that have been disposed

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>