changeset 1500:c3c46399bcf1

fix problem reported in ticket 327 - thanks d0k
author Kelly Wilson <wilsonk cpsc.ucalgary.ca>
date Tue, 16 Jun 2009 08:57:20 -0600
parents df11cdec45a2
children 8b9f236dd051
files gen/llvmhelpers.cpp
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/gen/llvmhelpers.cpp	Sun Jun 14 19:49:58 2009 +0200
+++ b/gen/llvmhelpers.cpp	Tue Jun 16 08:57:20 2009 -0600
@@ -979,10 +979,11 @@
     else if (AttribDeclaration* a = declaration->isAttribDeclaration())
     {
         Logger::println("AttribDeclaration");
-        for (int i=0; i < a->decl->dim; ++i)
-        {
-            DtoDeclarationExp((Dsymbol*)a->decl->data[i]);
-        }
+        if (a->decl)
+            for (int i=0; i < a->decl->dim; ++i)
+            {
+                DtoDeclarationExp((Dsymbol*)a->decl->data[i]);
+            }
     }
     // mixin declaration
     else if (TemplateMixin* m = declaration->isTemplateMixin())