(hopefully) fix crash described by @rslu in #224: it can happen
that dlist.empty() is true and thus h is a NULL pointer.