@@ -333,10 +333,17 @@ GMM_RESOURCE_INFO *GMM_STDCALL GmmLib::GmmClientContext::CreateResInfoObject(GMM
333333GMM_RESOURCE_INFO *GMM_STDCALL GmmLib::GmmClientContext::CopyResInfoObject (GMM_RESOURCE_INFO *pSrcRes)
334334{
335335 GMM_RESOURCE_INFO *pResCopy = NULL ;
336+ GmmClientContext * pClientContextIn = NULL ;
337+
338+ #if (!defined(GMM_UNIFIED_LIB))
339+ pClientContextIn = pGmmGlobalContext->pGmmGlobalClientContext ;
340+ #else
341+ pClientContextIn = this ;
342+ #endif
336343
337344 __GMM_ASSERTPTR (pSrcRes, NULL );
338345
339- pResCopy = new GMM_RESOURCE_INFO;
346+ pResCopy = new GMM_RESOURCE_INFO (pClientContextIn) ;
340347 if (!pResCopy)
341348 {
342349 GMM_ASSERTDPF (0 , " Allocation failed." );
@@ -361,9 +368,17 @@ GMM_RESOURCE_INFO *GMM_STDCALL GmmLib::GmmClientContext::CopyResInfoObject(GMM_R
361368// ///////////////////////////////////////////////////////////////////////////////////
362369void GMM_STDCALL GmmLib::GmmClientContext::ResMemcpy (void *pDst, void *pSrc)
363370{
371+ GmmClientContext *pClientContextIn = NULL ;
372+
373+ #if (!defined(GMM_UNIFIED_LIB))
374+ pClientContextIn = pGmmGlobalContext->pGmmGlobalClientContext ;
375+ #else
376+ pClientContextIn = this ;
377+ #endif
378+
364379 GMM_RESOURCE_INFO *pResSrc = reinterpret_cast <GMM_RESOURCE_INFO *>(pSrc);
365380 // Init memory correctly, in case the pointer is a raw memory pointer
366- GMM_RESOURCE_INFO *pResDst = new (pDst) GMM_RESOURCE_INFO ();
381+ GMM_RESOURCE_INFO *pResDst = new (pDst) GMM_RESOURCE_INFO (pClientContextIn );
367382
368383 *pResDst = *pResSrc;
369384}
0 commit comments