diff Common/StoragePlugin.cpp @ 8:987cb95c1aee

Prevent Orthanc to start if plugin fails to start
author Alain Mazy
date Mon, 20 Jul 2020 12:21:07 +0200
parents fc26a8fc54d5
children 2a02b21f0a19
line wrap: on
line diff
--- a/Common/StoragePlugin.cpp	Thu Jul 09 10:40:44 2020 +0200
+++ b/Common/StoragePlugin.cpp	Mon Jul 20 12:21:07 2020 +0200
@@ -189,6 +189,11 @@
 
     plugin.reset(StoragePluginFactory::CreateStoragePlugin(orthancConfig));
 
+    if (plugin.get() == nullptr)
+    {
+      return -1;
+    }
+
     static const char* const ENCRYPTION_SECTION = "StorageEncryption";
 
     if (orthancConfig.IsSection(ENCRYPTION_SECTION))