summaryrefslogtreecommitdiff
path: root/desktop/treeview.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2016-12-29 14:40:54 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2016-12-29 14:40:54 +0000
commit93fdbcc6de0d82323a67bc4c2d560f90a1f396cd (patch)
tree4c6d828f72346352c3143570c708778971b89e2b /desktop/treeview.c
parentb93ae2c28f2e1d3d4e0d20c5a5d09c930c49fb88 (diff)
downloadnetsurf-93fdbcc6de0d82323a67bc4c2d560f90a1f396cd.tar.gz
netsurf-93fdbcc6de0d82323a67bc4c2d560f90a1f396cd.tar.bz2
Treeview: Don't call corewindow callbacks if not attached to a corewindow.
Diffstat (limited to 'desktop/treeview.c')
-rw-r--r--desktop/treeview.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/desktop/treeview.c b/desktop/treeview.c
index fa8abc9b6..4c405ba3a 100644
--- a/desktop/treeview.c
+++ b/desktop/treeview.c
@@ -229,7 +229,9 @@ static inline void treeview__cw_redraw_request(
const struct treeview *tree,
const struct rect *r)
{
- tree->cw_t->redraw_request(tree->cw_h, r);
+ if (tree->cw_t != NULL) {
+ tree->cw_t->redraw_request(tree->cw_h, r);
+ }
}
@@ -244,7 +246,9 @@ static inline void treeview__cw_update_size(
const struct treeview *tree,
int width, int height)
{
- tree->cw_t->update_size(tree->cw_h, width, height);
+ if (tree->cw_t != NULL) {
+ tree->cw_t->update_size(tree->cw_h, width, height);
+ }
}
@@ -259,7 +263,9 @@ static inline void treeview__cw_get_window_dimensions(
const struct treeview *tree,
int *width, int *height)
{
- tree->cw_t->get_window_dimensions(tree->cw_h, width, height);
+ if (tree->cw_t != NULL) {
+ tree->cw_t->get_window_dimensions(tree->cw_h, width, height);
+ }
}
@@ -273,7 +279,9 @@ static inline void treeview__cw_drag_status(
const struct treeview *tree,
core_window_drag_status ds)
{
- tree->cw_t->drag_status(tree->cw_h, ds);
+ if (tree->cw_t != NULL) {
+ tree->cw_t->drag_status(tree->cw_h, ds);
+ }
}