merge: fix NULL pointer dereference when merging nothing into void