From: mar Date: Wed, 19 Jul 1989 14:37:41 +0000 (+0000) Subject: fix a couple of null pointer problems X-Git-Tag: PATCH5~5 X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/commitdiff_plain/0e37bdb8c63400e77ce3a6f7565eff3d08c99053 fix a couple of null pointer problems --- diff --git a/dbck/phase2.qc b/dbck/phase2.qc index ed39e720..1b50b343 100644 --- a/dbck/phase2.qc +++ b/dbck/phase2.qc @@ -651,7 +651,7 @@ phase2() sq_save_unique_data(sq1, id1); if (!hash_lookup(clusters, id2)) sq_save_unique_data(sq2, id2); - m->clucount++; + if (m) m->clucount++; ## } generic_delete(sq1, show_mcm_mach, "mcmap", "mach_id", 1); generic_delete(sq2, show_mcm_clu, "mcmap", "clu_id", 1); @@ -677,7 +677,8 @@ phase2() strtrim(type); if ((l = (struct list *) hash_lookup(lists, id1)) == NULL) sq_save_unique_data(sq1, id1); - l->members++; + else + l->members++; if (!strcmp(type, "USER") && !hash_lookup(users, id2)) sq_save_unique_data(sq2, id2); else if (!strcmp(type, "LIST") && !hash_lookup(lists, id2))