diff options
author | Duncan Mak <duncan@mono-cvs.ximian.com> | 2005-02-02 02:33:30 +0300 |
---|---|---|
committer | Duncan Mak <duncan@mono-cvs.ximian.com> | 2005-02-02 02:33:30 +0300 |
commit | 8d21746aa4044656772dc493996648e993e9141d (patch) | |
tree | 528df66edc24aff2067d71e1e78c56454b4f5139 /mcs | |
parent | e04c2c9215e74c08ac86ec0b27b0db763cfb1c11 (diff) |
2005-02-01 Duncan Mak <duncan@ximian.com>
* const.cs (LookupConstantValue): Check that `ce' is not null
before calling GetValue ().
svn path=/trunk/mcs/; revision=39956
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/mcs/ChangeLog | 5 | ||||
-rw-r--r-- | mcs/mcs/const.cs | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/mcs/mcs/ChangeLog b/mcs/mcs/ChangeLog index e9beb9e3877..3e0804e47d5 100644 --- a/mcs/mcs/ChangeLog +++ b/mcs/mcs/ChangeLog @@ -1,3 +1,8 @@ +2005-02-01 Duncan Mak <duncan@ximian.com> + + * const.cs (LookupConstantValue): Check that `ce' is not null + before calling GetValue (). + 2005-02-01 Raja R Harinath <rharinath@novell.com> Fix test-334.cs (#69519). diff --git a/mcs/mcs/const.cs b/mcs/mcs/const.cs index 337d988aba6..ac29b317cd3 100644 --- a/mcs/mcs/const.cs +++ b/mcs/mcs/const.cs @@ -252,7 +252,9 @@ namespace Mono.CSharp { } Expr = ce; } - ConstantValue = ce.GetValue (); + + if (ce != null) + ConstantValue = ce.GetValue (); if (MemberType.IsEnum){ // |