diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 48bf53ced..0da6220a8 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -206,7 +206,7 @@ namespace occa { assertInitialized(); OCCA_ERROR("Memory dtype [" << dtype__.name() << "] must be declared as global", dtype__.isGlobal()); - modeMemory->dtype_ = &dtype__; + modeMemory->dtype_ = &(dtype__.self()); } const dtype_t& memory::dtype() {