Mercurial > projects > ldc
diff gen/functions.cpp @ 1251:0c8048e13867
Add forgotten null check.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Tue, 21 Apr 2009 19:17:29 +0200 |
parents | 4b0b470bb2f9 |
children | 854e86eaa022 |
line wrap: on
line diff
--- a/gen/functions.cpp Tue Apr 21 18:57:29 2009 +0200 +++ b/gen/functions.cpp Tue Apr 21 19:17:29 2009 +0200 @@ -388,7 +388,7 @@ // queue declaration unless the function is abstract without body; // bodyless functions in an abstract class are considered abstract - ClassDeclaration* cd = fdecl->parent->isClassDeclaration(); + ClassDeclaration* cd = fdecl->isMember() ? fdecl->isMember()->isClassDeclaration() : NULL; bool isabstract = fdecl->isAbstract() || (cd && cd->isAbstract()); if (!isabstract || fdecl->fbody) {