diff OrthancServer/Internals/CommandDispatcher.cpp @ 1800:30e97a1f4093 worklists

callback for handling worklists with plugins
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 20 Nov 2015 13:53:20 +0100
parents 4f01c9d73f02
children cd213ebcaefd
line wrap: on
line diff
--- a/OrthancServer/Internals/CommandDispatcher.cpp	Fri Nov 20 12:57:14 2015 +0100
+++ b/OrthancServer/Internals/CommandDispatcher.cpp	Fri Nov 20 13:53:20 2015 +0100
@@ -803,7 +803,11 @@
               {
                 std::auto_ptr<IStoreRequestHandler> handler
                   (server_.GetStoreRequestHandlerFactory().ConstructStoreRequestHandler());
-                cond = Internals::storeScp(assoc_, &msg, presID, *handler, remoteIp_);
+
+                if (handler.get() != NULL)
+                {
+                  cond = Internals::storeScp(assoc_, &msg, presID, *handler, remoteIp_);
+                }
               }
               break;
 
@@ -812,7 +816,11 @@
               {
                 std::auto_ptr<IMoveRequestHandler> handler
                   (server_.GetMoveRequestHandlerFactory().ConstructMoveRequestHandler());
-                cond = Internals::moveScp(assoc_, &msg, presID, *handler, remoteIp_, remoteAet_, calledAet_);
+
+                if (handler.get() != NULL)
+                {
+                  cond = Internals::moveScp(assoc_, &msg, presID, *handler, remoteIp_, remoteAet_, calledAet_);
+                }
               }
               break;