Fixing double allocation of memory x_x

This commit is contained in:
Ben Vanik 2014-06-22 21:03:41 -07:00
parent 71eb408d67
commit 7b98c748fa
2 changed files with 2 additions and 6 deletions

View File

@ -55,11 +55,6 @@ int Runtime::Initialize(Frontend* frontend, Backend* backend) {
// Must be initialized by subclass before calling into this.
XEASSERTNOTNULL(memory_);
int result = memory_->Initialize();
if (result) {
return result;
}
// Create debugger first. Other types hook up to it.
debugger_ = new Debugger(this);
@ -102,7 +97,7 @@ int Runtime::Initialize(Frontend* frontend, Backend* backend) {
backend_ = backend;
frontend_ = frontend;
result = backend_->Initialize();
int result = backend_->Initialize();
if (result) {
return result;
}

View File

@ -63,6 +63,7 @@ typedef uint32_t X_RESULT;
#define X_HRESULT_FROM_WIN32(x) ((X_RESULT)(x) <= 0 ? ((X_RESULT)(x)) : ((X_RESULT) (((x) & 0x0000FFFF) | (X_FACILITY_WIN32 << 16) | 0x80000000)))
#define X_ERROR_SUCCESS X_HRESULT_FROM_WIN32(0x00000000L)
#define X_ERROR_ACCESS_DENIED X_HRESULT_FROM_WIN32(0x00000005L)
#define X_ERROR_NO_MORE_FILES X_HRESULT_FROM_WIN32(0x00000018L)
#define X_ERROR_INSUFFICIENT_BUFFER X_HRESULT_FROM_WIN32(0x0000007AL)
#define X_ERROR_BAD_ARGUMENTS X_HRESULT_FROM_WIN32(0x000000A0L)
#define X_ERROR_BUSY X_HRESULT_FROM_WIN32(0x000000AAL)