improved error handling for NullReferenceExceptions
Authored by: floriwan 2011-04-05
Parent: [r151]
Child: [r153]