null-pointer crash behoben

This commit is contained in:
Enno Rehling 2005-04-27 22:29:11 +00:00
parent 43add26d80
commit 824315dc81
1 changed files with 1 additions and 1 deletions

View File

@ -2624,7 +2624,7 @@ get_regions_distance(region * root, int radius)
rp = &r->next;
for (d=0;d!=MAXDIRECTIONS;++d) {
region * rn = rconnect(r->data, d);
if (!fval(rn, FL_MARK) && distance(rn, root)<=radius) {
if (rn!=NULL && !fval(rn, FL_MARK) && distance(rn, root)<=radius) {
add_regionlist(rp, rn);
fset(rn, FL_MARK);
}