summaryrefslogtreecommitdiff
path: root/riscos/treeview.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-09-03 17:12:08 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2013-09-03 17:12:08 +0100
commit1658554437f651a144311c18f21eb2bf449250c1 (patch)
tree2c8d8abfecf4a0382e2be826c3fec49cb06942a6 /riscos/treeview.c
parentbd38b712c6aa8b3c7ee4c27226364209834428eb (diff)
downloadnetsurf-1658554437f651a144311c18f21eb2bf449250c1.tar.gz
netsurf-1658554437f651a144311c18f21eb2bf449250c1.tar.bz2
Don't allow what treeview initialisation sets as the dimensions to be overwritten with defaults of 0.
Diffstat (limited to 'riscos/treeview.c')
-rw-r--r--riscos/treeview.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/riscos/treeview.c b/riscos/treeview.c
index 479a857cc..51b6809c5 100644
--- a/riscos/treeview.c
+++ b/riscos/treeview.c
@@ -155,12 +155,6 @@ ro_treeview *ro_treeview_create(wimp_w window, struct toolbar *toolbar,
tv->w = window;
tv->tb = toolbar;
- tv->tree = tree_create(flags, &ro_tree_callbacks, tv);
- if (tv->tree == NULL) {
- free(tv);
- return NULL;
- }
-
/* Set the tree redraw origin at a default 0,0 RO units. */
tv->origin.x = 0;
@@ -181,6 +175,12 @@ ro_treeview *ro_treeview_create(wimp_w window, struct toolbar *toolbar,
tv->drag = TREE_NO_DRAG;
+ tv->tree = tree_create(flags, &ro_tree_callbacks, tv);
+ if (tv->tree == NULL) {
+ free(tv);
+ return NULL;
+ }
+
/* Record the callback info. */
tv->callbacks = callbacks;