We have encountered this null pointer dereference issue too, with this fix the test can be executed properly. Tested-by: Po-Hsu Lin <po-hsu.lin@canonical.com>