]> source.dussan.org Git - gitblit.git/commitdiff
Fix possible NPE when deleting a repository and cleaning-up branch-based tickets
authorJames Moger <james.moger@gitblit.com>
Tue, 8 Apr 2014 03:03:31 +0000 (23:03 -0400)
committerJames Moger <james.moger@gitblit.com>
Tue, 8 Apr 2014 03:03:31 +0000 (23:03 -0400)
src/main/java/com/gitblit/tickets/BranchTicketService.java

index f23a3259cc4b5721d0ec4d8b19547aaaeff79c4d..56055a4a759479f64abad3a4fdc4f69c75bec151 100644 (file)
@@ -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;
        }