diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2010-10-14 00:59:39 +0000 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2010-10-14 00:59:39 +0000 |
commit | 1dbbbaf64ad0c8e3cd81ea7453f091f3bb4c9075 (patch) | |
tree | 1c9428278d8d23cb06e59baf799046997a316916 /windows/gui.c | |
parent | 7e0e61992a32a7262089fb0e38c47957a64aaba3 (diff) | |
download | netsurf-1dbbbaf64ad0c8e3cd81ea7453f091f3bb4c9075.tar.gz netsurf-1dbbbaf64ad0c8e3cd81ea7453f091f3bb4c9075.tar.bz2 |
ensure iframe stuff does not de-reference null pointers
svn path=/trunk/netsurf/; revision=10884
Diffstat (limited to 'windows/gui.c')
-rw-r--r-- | windows/gui.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/windows/gui.c b/windows/gui.c index d2a1bff75..0c29cfdad 100644 --- a/windows/gui.c +++ b/windows/gui.c @@ -2006,6 +2006,8 @@ void gui_window_scroll_visible(struct gui_window *w, int x0, int y0, void gui_window_position_frame(struct gui_window *w, int x0, int y0, int x1, int y1) { + if (w == NULL) + return; LOG(("position frame %s: %d, %d, %d, %d", w->bw->name, x0, y0, x1, y1)); MoveWindow(w->drawingarea, x0, y0, x1-x0, y1-y0, true); @@ -2014,9 +2016,11 @@ void gui_window_position_frame(struct gui_window *w, int x0, int y0, void gui_window_get_dimensions(struct gui_window *w, int *width, int *height, bool scaled) { - LOG(("get dimensions %p w=%d h=%d", w, w->width, w->height)); if (w == NULL) return; + + LOG(("get dimensions %p w=%d h=%d", w, w->width, w->height)); + *width = w->width; *height = w->height; } |