{
struct __ecereNameSpace__ecere__com__BitMember * member = __ecereNameSpace__ecere__com__eClass_AddBitMember(regClass, name, line[0] ? line : 0, 0, 0, memberAccess);
+if(member)
+{
member->size = size;
member->pos = bitPos;
}
+}
else if(regClass)
{
if(!__ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, name, line[0] ? line : 0, 0, 0, memberAccess))
if(type)
{
-while(type->kind == 8 && type->__anon1._class->__anon1.registered && (type->__anon1._class->__anon1.registered->type == 2 || type->__anon1._class->__anon1.registered->type == 3 || type->__anon1._class->__anon1.registered->type == 4))
+while(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered && (type->__anon1._class->__anon1.registered->type == 2 || type->__anon1._class->__anon1.registered->type == 3 || type->__anon1._class->__anon1.registered->type == 4))
{
if(!type->__anon1._class->__anon1.registered->dataType)
type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
{
for(ctx = curContext; ctx != topContext->parent && !symbol; ctx = ctx->parent)
{
+if(!ctx)
+break;
symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&ctx->symbols, id->string);
if(symbol)
break;
struct Identifier * ident = (((void *)0));
struct __ecereNameSpace__ecere__com__DataMember * thisMember = (((void *)0));
-if(member->identifiers)
+if(member->identifiers && (*member->identifiers).first)
{
struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
int _subMemberStackPos = 0;
{
dummyDecl = MkDeclaration((((void *)0)), (((void *)0)));
+if(curCompound)
+{
if(!curCompound->__anon1.compound.declarations)
curCompound->__anon1.compound.declarations = MkList();
__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), dummyDecl);
+}
sprintf(className, "__simpleStruct%d", curContext->simpleID++);
{
struct __ecereNameSpace__ecere__sys__OldList * list = MkList();
{
//eClass_AddBitMember(regClass, name, line[0] ? line : 0, size, bitPos);
BitMember member = eClass_AddBitMember(regClass, name, line[0] ? line : 0, 0, 0, memberAccess);
- member.size = size;
- member.pos = bitPos;
+ if(member)
+ {
+ member.size = size;
+ member.pos = bitPos;
+ }
}
else if(regClass)
{
// First, check if the identifier is declared inside the function
for(ctx = curContext; ctx != topContext.parent && !symbol; ctx = ctx.parent)
{
+ if(!ctx) break; // This happened opening old mapTileCache.ec from archives?
symbol = (Symbol)ctx.symbols.FindString(id.string);
if(symbol) break;
}
Type type = exp.expType;
if(type)
{
- while(type.kind == classType &&
+ while(type.kind == classType && type._class &&
type._class.registered && (type._class.registered.type == bitClass || type._class.registered.type == unitClass || type._class.registered.type == enumClass))
{
if(!type._class.registered.dataType)
{
Identifier ident = null;
DataMember thisMember = null;
- if(member.identifiers)
+ if(member.identifiers && member.identifiers->first)
{
DataMember _subMemberStack[256];
int _subMemberStackPos = 0;
// TRICKY STUFF, UGLY HACK FOR stateSizeAnchor = SizeAnchor { size.w = 10 };
dummyDecl = MkDeclaration(null,null);
- if(!curCompound.compound.declarations)
- curCompound.compound.declarations = MkList();
- curCompound.compound.declarations->Insert(null, dummyDecl);
+ if(curCompound)
+ {
+ if(!curCompound.compound.declarations)
+ curCompound.compound.declarations = MkList();
+ curCompound.compound.declarations->Insert(null, dummyDecl);
+ }
sprintf(className, "__simpleStruct%d", curContext.simpleID++);