Skip to content

Commit 51b9b7f

Browse files
author
Martin Spielmann
committed
Fix nullpointer exception with unsupported URL protocol #1237
1 parent 337443c commit 51b9b7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/gitblit/manager/ServicesManager.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ public int compare(RepositoryUrl o1, RepositoryUrl o2) {
276276
Iterator<RepositoryUrl> itr = list.iterator();
277277
while (itr.hasNext()) {
278278
RepositoryUrl url = itr.next();
279-
if (url.transport.equals(preferredTransport)) {
279+
if (url.transport != null && url.transport.equals(preferredTransport)) {
280280
itr.remove();
281281
preferredUrl = url;
282282
break;

0 commit comments

Comments
 (0)