[libgit2-glib] diff: it is an error to pass NULL for both the `old_tree` and `new_tree`.
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib] diff: it is an error to pass NULL for both the `old_tree` and `new_tree`.
- Date: Thu, 20 Jun 2013 07:36:34 +0000 (UTC)
commit 204fc976f8d2d2f227335ce4d67ee26b711a5c5a
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Thu Jun 20 09:36:06 2013 +0200
diff: it is an error to pass NULL for both the `old_tree` and `new_tree`.
libgit2-glib/ggit-diff.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/libgit2-glib/ggit-diff.c b/libgit2-glib/ggit-diff.c
index 624c191..583ee37 100644
--- a/libgit2-glib/ggit-diff.c
+++ b/libgit2-glib/ggit-diff.c
@@ -164,6 +164,7 @@ ggit_diff_new_tree_to_tree (GgitRepository *repository,
g_return_val_if_fail (GGIT_IS_REPOSITORY (repository), NULL);
g_return_val_if_fail (old_tree == NULL || GGIT_IS_TREE (old_tree), NULL);
g_return_val_if_fail (new_tree == NULL || GGIT_IS_TREE (new_tree), NULL);
+ g_return_val_if_fail (new_tree != NULL || new_tree != NULL, NULL);
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
ret = git_diff_tree_to_tree (&diff,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]