Ensure the connection is not null before using it.
Ensure the connection is not null before using it.


Former-commit-id: c89249c13b833233d008dc351f6205fdecbe614c
gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine