Fix crash when removing a folder

The problem is that the module_property of csync are not really tight to
a context, but are global to all the contextes.
Which means csync_owncloud may still have a pointer to the destroyed
context of the destroyed folder.
By always resetting the context pointer, we make sure there is no stale
pointers there
This commit is contained in:
Olivier Goffart 2013-06-12 12:13:09 +02:00
parent 99579e8a2a
commit 334443adbb

View file

@ -315,6 +315,7 @@ void CSyncThread::startSync()
// cleans up behind us and emits finished() to ease error handling // cleans up behind us and emits finished() to ease error handling
CSyncRunScopeHelper helper(_csync_ctx, this); CSyncRunScopeHelper helper(_csync_ctx, this);
csync_set_module_property(_csync_ctx, "csync_context", _csync_ctx);
csync_set_userdata(_csync_ctx, this); csync_set_userdata(_csync_ctx, this);
// csync_set_auth_callback( _csync_ctx, getauth ); // csync_set_auth_callback( _csync_ctx, getauth );