Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changeset 2743

Show
Ignore:
Timestamp:
11/02/07 23:40:06 (1 year ago)
Author:
kris
Message:

fixes #686 :: Formatting causes access violation when trying to format a null class reference

(Thanks Jarrett)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tango/text/convert/Layout.d

    r2652 r2743  
    493493                             
    494494                       case TypeCode.CLASS: 
    495                             return fromUtf8 ((*cast(Object*) p).toUtf8, result); 
     495                            static T[] Null = "{null}"; 
     496                            auto c = *cast(Object*) p; 
     497                            return c ? fromUtf8 (c.toUtf8, result) : Null; 
    496498 
    497499                       case TypeCode.ENUM: