diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2024-03-01 20:32:17 -0500 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2024-03-02 16:58:43 -0500 |
commit | ce94a168f6a10455e98e2be7bd905bb9fb7f7fc1 (patch) | |
tree | 92feb51444a8e1b4bd49f8996329f6823a60a63a | |
parent | 95e93cfd56c8dec57a3bb2627d7714944713c37a (diff) |
add check for null pointer, avoid dereferencing
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
-rw-r--r-- | src/Tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -903,7 +903,7 @@ arrange_subtree(TreeWidget tree, Widget w, int depth, int x, int y) /* * now layout parent between first and last children */ - if (relayout) { + if (relayout && (child != NULL)) { Position adjusted; TreeConstraints firstcc = TREE_CONSTRAINT (tc->tree.children[0]); TreeConstraints lastcc = TREE_CONSTRAINT (child); |