core/logic/HandleSys.cpp
changeset 4126 e3385d61402c
parent 4115 b5511a1fa380
child 4175 3ae24e84c028
     1.1 --- a/core/logic/HandleSys.cpp	Fri Sep 13 13:47:55 2013 -0400
     1.2 +++ b/core/logic/HandleSys.cpp	Sat Sep 14 12:23:04 2013 -0400
     1.3 @@ -899,10 +899,6 @@
     1.4  		m_Types[++m_FreeTypes].freeID = type;
     1.5  	}
     1.6  
     1.7 -	/* Invalidate the type now */
     1.8 -	IHandleTypeDispatch *dispatch = pType->dispatch;
     1.9 -	pType->dispatch = NULL;
    1.10 -
    1.11  	/* Make sure nothing is using this type. */
    1.12  	if (pType->opened)
    1.13  	{
    1.14 @@ -924,6 +920,9 @@
    1.15  		}
    1.16  	}
    1.17  
    1.18 +	/* Invalidate the type now */
    1.19 +	pType->dispatch = NULL;
    1.20 +
    1.21  	/* Remove it from the type cache. */
    1.22  	if (!pType->name.isVoid())
    1.23  		m_TypeLookup.remove(pType->name.chars());