diff --git a/Code/OysterGraphics/DllInterfaces/GFXAPI.cpp b/Code/OysterGraphics/DllInterfaces/GFXAPI.cpp index b38984dc..cca2786c 100644 --- a/Code/OysterGraphics/DllInterfaces/GFXAPI.cpp +++ b/Code/OysterGraphics/DllInterfaces/GFXAPI.cpp @@ -88,6 +88,7 @@ namespace Oyster Model::ModelInfo* mi = (Model::ModelInfo*)m->info; if(mi->Vertices->GetBufferPointer() == NULL) { + delete m; return NULL; } diff --git a/Code/Tester/MainTest.cpp b/Code/Tester/MainTest.cpp index af6917c8..f9ceec99 100644 --- a/Code/Tester/MainTest.cpp +++ b/Code/Tester/MainTest.cpp @@ -161,10 +161,10 @@ HRESULT InitDirect3D() m = Oyster::Graphics::API::CreateModel(L"crate2"); if(m==NULL) - m = Oyster::Graphics::API::CreateModel(L"crate"); - m2 = Oyster::Graphics::API::CreateModel(L"crate"); + m = Oyster::Graphics::API::CreateModel(L"christmastree"); + m2 = Oyster::Graphics::API::CreateModel(L"christmastree"); m2->WorldMatrix = Oyster::Math3D::OrientationMatrix(Oyster::Math::Float3::null,Oyster::Math::Float3(0,5,0),Oyster::Math::Float3::null); - m3 = Oyster::Graphics::API::CreateModel(L"crate"); + m3 = Oyster::Graphics::API::CreateModel(L"christmastree"); m3->WorldMatrix = Oyster::Math3D::OrientationMatrix(Oyster::Math::Float3::null,Oyster::Math::Float3(0,5,0),Oyster::Math::Float3::null);