Permalink
Browse files

Merge pull request #90 from rbishop/master

fix null ref exception on CLRv2 in DLR.fs
  • Loading branch information...
2 parents 4ac68b9 + 6eacb90 commit 142f8a05638faf2da4fa1cee938ba06fcc7ba5e7 @otac0n otac0n committed Jan 4, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 Src/IronJS/Dlr.fs
View
@@ -590,7 +590,10 @@ module Dlr =
let flags = BindingFlags.NonPublic ||| BindingFlags.Instance
typeof<Expr>.GetProperty("DebugView", flags)
- let debugView (expr:Expr) = string (_dbgViewProp.GetValue(expr, null))
+ let debugView (expr:Expr) =
+ if _dbgViewProp = null
+ then ""
+ else string (_dbgViewProp.GetValue(expr, null))
let printDebugView (expr:Expr) = printf "%s" (expr |> debugView)
let is type' (expr:Expr) = FSharp.Utils.isType type' expr.Type

0 comments on commit 142f8a0

Please sign in to comment.