assert(event == AVAHI_BROWSER_REMOVE);
- if (avahi_record_equal_no_ttl(record, r->ptr_record)) {
+ if (r->ptr_record && avahi_record_equal_no_ttl(record, r->ptr_record)) {
avahi_record_unref(r->ptr_record);
r->ptr_record = NULL;
assert(event == AVAHI_BROWSER_REMOVE);
- if (avahi_record_equal_no_ttl(record, r->address_record)) {
+ if (r->address_record && avahi_record_equal_no_ttl(record, r->address_record)) {
avahi_record_unref(r->address_record);
r->address_record = NULL;
} else {
assert(event == AVAHI_BROWSER_REMOVE);
+
switch (record->key->type) {
case AVAHI_DNS_TYPE_SRV:
- if (avahi_record_equal_no_ttl(record, r->srv_record)) {
+ if (r->srv_record && avahi_record_equal_no_ttl(record, r->srv_record)) {
avahi_record_unref(r->srv_record);
r->srv_record = NULL;
case AVAHI_DNS_TYPE_TXT:
- if (avahi_record_equal_no_ttl(record, r->txt_record)) {
+ if (r->txt_record && avahi_record_equal_no_ttl(record, r->txt_record)) {
avahi_record_unref(r->txt_record);
r->txt_record = NULL;
case AVAHI_DNS_TYPE_A:
case AVAHI_DNS_TYPE_AAAA:
- if (avahi_record_equal_no_ttl(record, r->address_record)) {
+ if (r->address_record && avahi_record_equal_no_ttl(record, r->address_record)) {
avahi_record_unref(r->address_record);
r->address_record = NULL;