[sgen] Ensure the cardtable code is 64bits clean.
[mono.git] / mono / metadata / mono-basic-block.c
index 51e6d7096ad01062c75776bf9142f0ee8313a645..a62c39868d18bf86f36539b771e5a2d676ec4110 100644 (file)
@@ -519,8 +519,6 @@ mono_basic_block_split (MonoMethod *method, MonoError *error)
        MonoSimpleBasicBlock *bb, *root;
        const unsigned char *start, *end;
        MonoMethodHeader *header = mono_method_get_header (method);
-       start = header->code;
-       end = start + header->code_size;
 
        mono_error_init (error);
 
@@ -529,6 +527,9 @@ mono_basic_block_split (MonoMethod *method, MonoError *error)
                return NULL;
        }
 
+       start = header->code;
+       end = start + header->code_size;
+
        bb = g_new0 (MonoSimpleBasicBlock, 1);
        bb->start = 0;
        bb->end = end - start;