Browse Source

Fix GAPI impl destructors

1vanK 3 years ago
parent
commit
364af79193

+ 1 - 1
Source/Urho3D/GraphicsAPI/Direct3D11/D3D11Graphics.cpp

@@ -258,7 +258,7 @@ void Graphics::Destructor_D3D11()
         window_ = nullptr;
         window_ = nullptr;
     }
     }
 
 
-    delete impl_;
+    delete static_cast<GraphicsImpl_D3D11*>(impl_);
     impl_ = nullptr;
     impl_ = nullptr;
 
 
     context_->ReleaseSDL();
     context_->ReleaseSDL();

+ 1 - 1
Source/Urho3D/GraphicsAPI/Direct3D9/D3D9Graphics.cpp

@@ -290,7 +290,7 @@ void Graphics::Destructor_D3D9()
         window_ = nullptr;
         window_ = nullptr;
     }
     }
 
 
-    delete impl_;
+    delete static_cast<GraphicsImpl_D3D9*>(impl_);
     impl_ = nullptr;
     impl_ = nullptr;
 
 
     context_->ReleaseSDL();
     context_->ReleaseSDL();

+ 1 - 1
Source/Urho3D/GraphicsAPI/OpenGL/OGLGraphics.cpp

@@ -317,7 +317,7 @@ void Graphics::Destructor_OGL()
 {
 {
     Close_OGL();
     Close_OGL();
 
 
-    delete impl_;
+    delete static_cast<GraphicsImpl_OGL*>(impl_);
     impl_ = nullptr;
     impl_ = nullptr;
 
 
     context_->ReleaseSDL();
     context_->ReleaseSDL();