diff MAINTENANCE safety check for coverity
diff --git a/src/diff.c b/src/diff.c
index d456a64..7285211 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -583,6 +583,7 @@
                 if (op == LYD_DIFF_OP_DELETE) {
                     ret = lyd_diff_add(iter_first, op, orig_default, orig_value, NULL, NULL, NULL, diff);
                 } else {
+                    assert(match_second);
                     ret = lyd_diff_add(match_second, op, orig_default, orig_value, NULL, NULL, NULL, diff);
                 }