summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/tickets
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-04-07 23:03:31 -0400
committerJames Moger <james.moger@gitblit.com>2014-04-07 23:03:31 -0400
commit2bd0c5e34a254009fe034a9cec5324e55166c4c8 (patch)
tree0fbbda85307fda8990a71c80d4872b0642d985be /src/main/java/com/gitblit/tickets
parente5c982fa61f9f1b289d7454bdb92ee3167ee784d (diff)
downloadgitblit-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.java4
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;
}