Ensure connection is non-null

The function getConnectionLocked can return null. We must check the
result for null to prevent dereferencing null.

Bug: 143459140
Test: none
Change-Id: I43991ea2ac9e23b5d5fc198a0ac8622d83696d31
1 file changed