diff options
Diffstat (limited to 'database/sqlite/sqlite_functions.c')
-rw-r--r-- | database/sqlite/sqlite_functions.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/database/sqlite/sqlite_functions.c b/database/sqlite/sqlite_functions.c index b7ed5db103..4137a3baa4 100644 --- a/database/sqlite/sqlite_functions.c +++ b/database/sqlite/sqlite_functions.c @@ -1408,8 +1408,10 @@ RRDHOST *sql_create_host_by_uuid(char *hostname) rrdhost_flag_set(host, RRDHOST_FLAG_ARCHIVED); #ifdef ENABLE_DBENGINE - for(int tier = 0; tier < storage_tiers ; tier++) - host->storage_instance[tier] = (STORAGE_INSTANCE *)multidb_ctx[tier]; + if(dbengine_enabled) { + for (int tier = 0; tier < storage_tiers; tier++) + host->storage_instance[tier] = (STORAGE_INSTANCE *)multidb_ctx[tier]; + } #endif failed: |