diff options
author | James Moger <james.moger@gitblit.com> | 2014-04-07 23:03:31 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-04-07 23:03:31 -0400 |
commit | 2bd0c5e34a254009fe034a9cec5324e55166c4c8 (patch) | |
tree | 0fbbda85307fda8990a71c80d4872b0642d985be /src/main/java/com/gitblit/tickets | |
parent | e5c982fa61f9f1b289d7454bdb92ee3167ee784d (diff) | |
download | gitblit-2bd0c5e34a254009fe034a9cec5324e55166c4c8.tar.gz gitblit-2bd0c5e34a254009fe034a9cec5324e55166c4c8.zip |
Fix possible NPE when deleting a repository and cleaning-up branch-based tickets
Diffstat (limited to 'src/main/java/com/gitblit/tickets')
-rw-r--r-- | src/main/java/com/gitblit/tickets/BranchTicketService.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/gitblit/tickets/BranchTicketService.java b/src/main/java/com/gitblit/tickets/BranchTicketService.java index f23a3259..56055a4a 100644 --- a/src/main/java/com/gitblit/tickets/BranchTicketService.java +++ b/src/main/java/com/gitblit/tickets/BranchTicketService.java @@ -872,7 +872,9 @@ public class BranchTicketService extends ITicketService implements RefsChangedLi } catch (Exception e) { log.error(null, e); } finally { - db.close(); + if (db != null) { + db.close(); + } } return false; } |