Check if colliding task has actually a CHILD, i.e. after a migrate
[strongswan.git] / src / libcharon / sa / tasks / child_rekey.c
index b39a5fc..05db057 100644 (file)
@@ -252,7 +252,10 @@ static child_sa_t *handle_collision(private_child_rekey_t *this)
                        {
                                /* disable close action for the redundand child */
                                child_sa = other->child_create->get_child(other->child_create);
                        {
                                /* disable close action for the redundand child */
                                child_sa = other->child_create->get_child(other->child_create);
-                               child_sa->set_close_action(child_sa, ACTION_NONE);
+                               if (child_sa)
+                               {
+                                       child_sa->set_close_action(child_sa, ACTION_NONE);
+                               }
                        }
                }
                else
                        }
                }
                else