mirror of
https://github.com/rizinorg/rizin.git
synced 2026-10-12 02:21:57 +00:00
Add missing NULL check before passing the edge to cb(). (#6428)
This commit is contained in:
@@ -1506,7 +1506,7 @@ RZ_API RzGraphStatus rz_graph_update_edge(
|
||||
void *cb_data) {
|
||||
rz_return_val_if_fail(g && from && to, RZ_GRAPH_STATUS_ERR);
|
||||
RzGraphEdge *e = rz_graph_find_edge(g, from, to);
|
||||
bool update = (!cb || cb(e, cb_data));
|
||||
bool update = (!cb || (e && cb(e, cb_data)));
|
||||
if (e && update) {
|
||||
if (g->edge_data_free) {
|
||||
g->edge_data_free(e->data);
|
||||
|
||||
Reference in New Issue
Block a user