quartz/tests: Fix potential NULL dereference (Coverity).