From 76d3ea2f417f44d3a3a6b214db4937fcfdf9ce3a Mon Sep 17 00:00:00 2001 From: mccallum Date: Tue, 7 May 1996 01:16:34 +0000 Subject: [PATCH] ([Decoder -decodeObjectAt:anObjPtr:name]): Move CREATE_REF_BEFORE_INIT assertion to inside conditional for FREF being true. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1502 72102866-910b-0410-8b05-ffd578937521 --- Source/Decoder.m | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Source/Decoder.m b/Source/Decoder.m index ebe3f53f8..e52d11e17 100644 --- a/Source/Decoder.m +++ b/Source/Decoder.m @@ -632,11 +632,6 @@ static int debug_coder = 0; SEL init_sel = sel_get_any_uid("initWithCoder:"); Method *init_method = class_get_instance_method(object_class, init_sel); - - NSAssert (!create_ref_before_init, - @"You are trying to decode an object with the non-GNU" - @"OpenStep-style of forward references, but the object's" - @"decoding mechanism wants to use GNU features."); /* xxx Or should I send +alloc? */ *anObjPtr = (id) NSAllocateObject (object_class, 0, zone); if (create_ref_before_init) @@ -654,7 +649,13 @@ static int debug_coder = 0; at: &fref withName: NULL]; if (fref) - [self _coderSatisfyForwardReference: fref withObject: *anObjPtr]; + { + NSAssert (!create_ref_before_init, + @"You are trying to decode an object with the non-GNU\n" + @"OpenStep-style forward references, but the object's\n" + @"decoding mechanism wants to use GNU features."); + [self _coderSatisfyForwardReference: fref withObject: *anObjPtr]; + } /* Would get error here with Connection-wide object references because addProxy gets called in +newRemote:connection: */