base: avoid null pointer warning in avl tree

Issue #3022
This commit is contained in:
Alexander Boettcher 2018-10-25 12:03:02 +02:00 committed by Norman Feske
parent 7536b665f1
commit c2d54aaede

View File

@ -47,13 +47,13 @@ void Avl_node_base::_rotate_subtree(Avl_node_base *node, Side side, Policy &poli
int i = (node == _child[0]) ? LEFT : RIGHT; int i = (node == _child[0]) ? LEFT : RIGHT;
Avl_node_base *node_r = node->_child[!side]; Avl_node_base *node_r = node->_child[!side];
Avl_node_base *node_r_l = node_r->_child[side];
if (!node_r) { if (!node_r) {
error("avl rotation node_r is invalid"); error("avl rotation node_r is invalid");
return; return;
} }
Avl_node_base *node_r_l = node_r->_child[side];
/* simple rotation */ /* simple rotation */
if (node_r->_bias() == !side) { if (node_r->_bias() == !side) {