Check an object has a frame name before comparing.

svn path=/trunk/netsurf/; revision=2733
This commit is contained in:
James Bursa 2006-07-12 04:22:57 +00:00
parent 06429e69b5
commit 1bf15f1e15

View File

@ -1549,7 +1549,8 @@ bool html_find_frame(struct content *c, const char *frame,
assert(c->type == CONTENT_HTML);
for (j = 0; j != c->data.html.object_count; j++) {
if (!strcmp(c->data.html.object[j].frame, frame)) {
if (c->data.html.object[j].frame &&
!strcmp(c->data.html.object[j].frame, frame)) {
*page = c;
*i = j;
return true;