lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] [2/4] git commit: Fix for empty parcel list
Date Sat, 22 Mar 2014 14:46:19 GMT
Fix for empty parcel list


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

Branch: refs/heads/master
Commit: 2ff4d25953f751b02ad0861230137d50ba0a628c
Parents: d9e0f28
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Sat Mar 22 15:03:31 2014 +0100
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Sat Mar 22 15:03:31 2014 +0100

----------------------------------------------------------------------
 compiler/src/CFCParcel.c | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/2ff4d259/compiler/src/CFCParcel.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCParcel.c b/compiler/src/CFCParcel.c
index fd424f4..c09be38 100644
--- a/compiler/src/CFCParcel.c
+++ b/compiler/src/CFCParcel.c
@@ -119,6 +119,11 @@ CFCParcel_register(CFCParcel *self) {
 
 CFCParcel**
 CFCParcel_all_parcels(void) {
+    if (registry == NULL) {
+        registry = (CFCParcel**)MALLOCATE(sizeof(CFCParcel*));
+        registry[0] = NULL;
+    }
+
     return registry;
 }
 


Mime
View raw message