dev-468: fixed a segfault caused by NULL