summaryrefslogtreecommitdiff
path: root/framebuffer
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2010-10-05 19:24:54 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2010-10-05 19:24:54 +0000
commit864f682465d626b330654d4e6bf6fee3565667a3 (patch)
treef2fd45076bbb9854d74bc99b61eca1d6104bc695 /framebuffer
parent6173bb0e6c3bf51cd463f7bc4f725429d9087b2b (diff)
downloadnetsurf-864f682465d626b330654d4e6bf6fee3565667a3.tar.gz
netsurf-864f682465d626b330654d4e6bf6fee3565667a3.tar.bz2
Squash warnings
svn path=/trunk/netsurf/; revision=10866
Diffstat (limited to 'framebuffer')
-rw-r--r--framebuffer/gui.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/framebuffer/gui.c b/framebuffer/gui.c
index 2d0598bc3..301bd2e93 100644
--- a/framebuffer/gui.c
+++ b/framebuffer/gui.c
@@ -940,7 +940,7 @@ create_toolbar(struct gui_window *gw,
fbtk_widget_t *widget;
int xpos; /* The position of the next widget. */
- int xlhs; /* extent of the left hand side widgets */
+ int xlhs = 0; /* extent of the left hand side widgets */
int xdir = 1; /* the direction of movement + or - 1 */
const char *itmtype; /* type of the next item */
@@ -1117,13 +1117,16 @@ create_toolbar(struct gui_window *gw,
break;
default:
+ widget = NULL;
xdir = 0;
LOG(("Unknown element %c in toolbar layout", *itmtype));
break;
}
- xpos += (xdir * (fbtk_get_width(widget) + padding));
+ if (widget != NULL) {
+ xpos += (xdir * (fbtk_get_width(widget) + padding));
+ }
LOG(("xpos is %d",xpos));