- DoBeginWriteProperty( pi ) ;
- wxASSERT_MSG( IsObjectKnown( sink ) , wxT("Streaming delegates for not already streamed objects not yet supported") ) ;
- DoWriteDelegate( obj , ci , pi , sink , GetObjectID( sink ) , sink->GetClassInfo() , handler ) ;
- DoEndWriteProperty( pi ) ;
+ if ( sink != NULL && handler != NULL )
+ {
+ DoBeginWriteProperty( pi ) ;
+ if ( IsObjectKnown( sink ) )
+ {
+ DoWriteDelegate( obj , ci , pi , sink , GetObjectID( sink ) , sink->GetClassInfo() , handler ) ;
+ DoEndWriteProperty( pi ) ;
+ }
+ else
+ {
+ wxLogError( _("Streaming delegates for not already streamed objects not yet supported") ) ;
+ }
+ }