compiler/libec: Fixed MemoryGuard issue returning void *[1] as any_object
authorJerome St-Louis <jerome@ecere.com>
Sat, 7 Jun 2014 00:56:25 +0000 (20:56 -0400)
committerJerome St-Louis <jerome@ecere.com>
Sat, 7 Jun 2014 00:56:25 +0000 (20:56 -0400)
- This was causing the IDE to crash in MemoryGuard config bringing up a FileDialog

compiler/bootstrap/libec/bootstrap/pass15.c
compiler/libec/src/pass15.ec

index 701f02d..9aeb61e 100644 (file)
@@ -13882,9 +13882,10 @@ checkedExp = checkedExp->__anon1.cast.exp;
 struct Expression * operand = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
 
 *operand = *checkedExp;
-checkedExp->destType = (((void *)0));
-checkedExp->expType = (((void *)0));
 __ecereMethod_Expression_Clear(checkedExp);
+checkedExp->destType = ProcessTypeString("void *", 0x0);
+checkedExp->expType = checkedExp->destType;
+checkedExp->destType->refCount++;
 checkedExp->type = 4;
 checkedExp->__anon1.op.op = '&';
 checkedExp->__anon1.op.exp1 = (((void *)0));
index cc83ef0..7421f54 100644 (file)
@@ -7538,9 +7538,11 @@ void ApplyAnyObjectLogic(Expression e)
                   {
                      Expression operand { };
                      operand = *checkedExp;
-                     checkedExp.destType = null;
-                     checkedExp.expType = null;
                      checkedExp.Clear();
+                     checkedExp.destType = ProcessTypeString("void *", false);
+                     checkedExp.expType = checkedExp.destType;
+                     checkedExp.destType.refCount++;
+
                      checkedExp.type = opExp;
                      checkedExp.op.op = '&';
                      checkedExp.op.exp1 = null;