r15260: Don't dereference NULL pointers to obtain array lengths - found by