rem: for (toplevel=view; !toplevel->flags.topLevel; toplevel=toplevel->parent);
add: for (toplevel=view; toplevel && !toplevel->flags.topLevel; toplevel=toplevel->parent);
context: W_TopLevelOfView(W_View *view){    W_View *toplevel;        for (toplevel=view; !toplevel->flags.topLevel; toplevel=toplevel->parent);        return toplevel;}