diff Plugin/Plugin.cpp @ 147:70d1fe6d6309

Avoid hard crash if not enough memory
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 09 Nov 2016 12:43:58 +0100
parents 16f8471e3872
children 5dc54316d68b
line wrap: on
line diff
--- a/Plugin/Plugin.cpp	Wed Nov 09 12:20:01 2016 +0100
+++ b/Plugin/Plugin.cpp	Wed Nov 09 12:43:58 2016 +0100
@@ -96,7 +96,7 @@
     boost::filesystem::path p(path);
     db_.Open((p / "cache.db").string());
 
-    cache_.reset(new OrthancPlugins::CacheManager(db_, storage_));
+    cache_.reset(new OrthancPlugins::CacheManager(context_, db_, storage_));
     //cache_->SetSanityCheckEnabled(true);  // For debug
 
     scheduler_.reset(new OrthancPlugins::CacheScheduler(*cache_, 100));