You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2013/05/18 21:23:59 UTC

[lucy-commits] [14/15] git commit: refs/heads/install-c-library - Allow NULL target in Doc#Extract

Allow NULL target in Doc#Extract

Something like a simple Doc#Fetch method might be useful for the C
library.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/acb55b73
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/acb55b73
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/acb55b73

Branch: refs/heads/install-c-library
Commit: acb55b73d7694587d8dfb3e4566323c0b5164097
Parents: 174f42b
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sat May 18 21:18:13 2013 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sat May 18 21:18:13 2013 +0200

----------------------------------------------------------------------
 c/src/Lucy/Document/Doc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/acb55b73/c/src/Lucy/Document/Doc.c
----------------------------------------------------------------------
diff --git a/c/src/Lucy/Document/Doc.c b/c/src/Lucy/Document/Doc.c
index 8e898ec..8b44af2 100644
--- a/c/src/Lucy/Document/Doc.c
+++ b/c/src/Lucy/Document/Doc.c
@@ -83,7 +83,7 @@ Doc_extract(Doc *self, CharBuf *field,
     Hash *hash = (Hash *)self->fields;
     Obj  *obj  = Hash_Fetch(hash, (Obj *)field);
 
-    if (obj && Obj_Is_A(obj, CHARBUF)) {
+    if (target && obj && Obj_Is_A(obj, CHARBUF)) {
         ViewCB_Assign(target, (CharBuf *)obj);
     }