From bb71a41a5774051723809c1b43262fd4415f9628 Mon Sep 17 00:00:00 2001
From: Xavier Robin <xavier.robin@unibas.ch>
Date: Fri, 13 Jan 2023 17:01:20 +0100
Subject: [PATCH] fix: SCHWED-5783 update only if used

---
 modules/mol/alg/pymod/ligand_scoring.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/mol/alg/pymod/ligand_scoring.py b/modules/mol/alg/pymod/ligand_scoring.py
index 85d0af427..68f9b581d 100644
--- a/modules/mol/alg/pymod/ligand_scoring.py
+++ b/modules/mol/alg/pymod/ligand_scoring.py
@@ -209,7 +209,8 @@ class LigandScorer:
             else:
                 raise RuntimeError("Ligands should be given as Entity or Residue")
 
-        new_editor.UpdateICS()
+        if new_editor is not None:
+            new_editor.UpdateICS()
         return extracted_ligands
 
 
-- 
GitLab