Ensure scaffolding object exists before using it

svn path=/trunk/netsurf/; revision=9738
This commit is contained in:
John Mark Bell 2009-12-18 20:21:13 +00:00
parent b75b2ae8bb
commit fcffcf4b18

View File

@ -1443,7 +1443,12 @@ nsgtk_scaffolding *nsgtk_new_scaffolding(struct gui_window *toplevel)
struct gtk_scaffolding *g = malloc(sizeof(*g));
char *searchname;
int i;
if (g == NULL) {
warn_user("NoMemory", 0);
return NULL;
}
LOG(("Constructing a scaffold of %p for gui_window %p", g, toplevel));
g->top_level = toplevel;