+2011-06-20 Tom Tromey <tromey@redhat.com>
+
+ * symtab.c (lookup_language_this): End loop if block is NULL.
+
2011-06-17 Tom Tromey <tromey@redhat.com>
* valops.c (value_of_this): Use lookup_language_this.
if (lang->la_name_of_this == NULL || block == NULL)
return NULL;
- while (1)
+ while (block)
{
struct symbol *sym;
if (sym != NULL)
return sym;
if (BLOCK_FUNCTION (block))
- return NULL;
+ break;
block = BLOCK_SUPERBLOCK (block);
}
+
+ return NULL;
}
/* Behave like lookup_symbol except that NAME is the natural name