Fix crash when trying to initiate/reset data source provider while app is quitting.