From 96b57ee3297793fa146e0f6bef28dad6d7911a96 Mon Sep 17 00:00:00 2001
From: jakubs <jakubs>
Date: Tue, 14 Feb 2012 09:09:14 +0000
Subject: [PATCH] LMS-2767 Add nullCheck in PostRegistrationDAO

SVN: 24445
---
 .../generic/server/dataaccess/db/PostRegistrationDAO.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/PostRegistrationDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/PostRegistrationDAO.java
index 081c68ec7ae..1a4a3d8d23b 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/PostRegistrationDAO.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/PostRegistrationDAO.java
@@ -42,9 +42,9 @@ public class PostRegistrationDAO extends AbstractGenericEntityDAO<PostRegistrati
     {
         PostRegistrationPE p = tryFindByDataSet(dataSet);
 
-        HibernateTemplate template = getHibernateTemplate();
         if (p != null)
         {
+            HibernateTemplate template = getHibernateTemplate();
             template.delete(p);
         }
     }
-- 
GitLab