changeset 324:d8c06c9408c2

dealing with restart of Orthanc in ICallbackRegistration::Unregister()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 07 Apr 2026 15:27:07 +0200
parents 7ab0a5ecda51
children 669914eab130
files Sources/ICallbackRegistration.cpp
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Sources/ICallbackRegistration.cpp	Tue Apr 07 14:28:40 2026 +0200
+++ b/Sources/ICallbackRegistration.cpp	Tue Apr 07 15:27:07 2026 +0200
@@ -160,5 +160,8 @@
   if (singletonCallback != NULL)
   {
     Py_XDECREF(singletonCallback);
+
+    // It is mandatory to set to NULL, in the case "/tools/reset" is used to restart Orthanc
+    singletonCallback = NULL;
   }
 }