-
Milan Crha authored
The save of the changes is scheduled for a GMainContext, with a chance to be cancelled when the folder is freed, but it could happen, with proper timing and thread interleaving, that the dipose() was called just before the schedule to save the changes was dispatched, but the dispose() already freed some internal structures, which could cause a crash elsewhere in the code. This change cancels the scheduled save as the first thing in the dispose() and it also changes the code to use a GWeakRef, which ensures the save is scheduled only if the dispose() was not called yet. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1914917
9991f16b