Fix null deref in sdb_apop