app: a few async font loading fixes
In gimp_data_factory_finalize(), wait on the factory's async set after canceling it, and before continuing destruction. It's not generally safe to just abandon an async op without waiting on it -- this is a font-specific hack, due to the fact we can't actually cancel font loading, and GimpFontFactory is prepared to handle this. Instead, in gimp_font_factory_finalize(), cancel and clear the async set, so that GimpDataFactory doesn't actually wait for loading to finish. In gimp_font_factory_load_async_callback(), don't try to acess the factory when the operation is canceled, since cancelation means the factory is already dead. On the other hand, when the opeation isn't canceled, make sure to thaw the container even when font loading failed, so that we always match the freeze at the begining of the operation.
Showing with 32 additions and 8 deletions