DAR-2322 fix a null pointer crash