Skip to content

Commit 55f4fb9

Browse files
committed
Fixed null pointer when stopping
1 parent 287e8a7 commit 55f4fb9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/org/vertx/mods/MongoPersistor.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ public void start() {
7474
}
7575

7676
public void stop() {
77-
mongo.close();
77+
if(mongo != null) {
78+
mongo.close();
79+
}
7880
}
7981

8082
public void handle(Message<JsonObject> message) {

0 commit comments

Comments
 (0)