Redmine 6541 - Remove unexpanded lists when extending lists

Is it safe to delete a null pointer?