diff options
Diffstat (limited to 'src/import')
-rw-r--r-- | src/import/import-dkr.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/import/import-dkr.c b/src/import/import-dkr.c index 594da547f5..e7dbe0f662 100644 --- a/src/import/import-dkr.c +++ b/src/import/import-dkr.c @@ -100,6 +100,8 @@ struct DkrImport { dkr_import_on_finished on_finished; void *userdata; + + bool finished; }; #define PROTOCOL_PREFIX "https://" @@ -181,6 +183,11 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(DkrImportName*, dkr_import_name_unref); static void dkr_import_finish(DkrImport *import, int error) { assert(import); + if (import->finished) + return; + + import->finished = true; + if (import->on_finished) import->on_finished(import, error, import->userdata); else |