mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
fix some valgrind conditional jump relies on uninit warnings
This commit is contained in:
parent
552d60ee2f
commit
2fe7912b1f
|
@ -1258,7 +1258,8 @@ int CGraphicsBackend_SDL_GL::Shutdown()
|
|||
delete m_pProcessor;
|
||||
m_pProcessor = nullptr;
|
||||
|
||||
SDL_GL_DeleteContext(m_GLContext);
|
||||
if(m_GLContext != nullptr)
|
||||
SDL_GL_DeleteContext(m_GLContext);
|
||||
SDL_DestroyWindow(m_pWindow);
|
||||
|
||||
SDL_QuitSubSystem(SDL_INIT_VIDEO);
|
||||
|
|
|
@ -111,8 +111,8 @@ struct SBackendCapabilites
|
|||
class CCommandProcessorFragment_SDL
|
||||
{
|
||||
// SDL stuff
|
||||
SDL_Window *m_pWindow;
|
||||
SDL_GLContext m_GLContext;
|
||||
SDL_Window *m_pWindow = nullptr;
|
||||
SDL_GLContext m_GLContext = nullptr;
|
||||
|
||||
public:
|
||||
enum
|
||||
|
@ -169,8 +169,8 @@ static constexpr size_t gs_GPUInfoStringSize = 256;
|
|||
// graphics backend implemented with SDL and the graphics library @see EBackendType
|
||||
class CGraphicsBackend_SDL_GL : public CGraphicsBackend_Threaded
|
||||
{
|
||||
SDL_Window *m_pWindow = NULL;
|
||||
SDL_GLContext m_GLContext;
|
||||
SDL_Window *m_pWindow = nullptr;
|
||||
SDL_GLContext m_GLContext = nullptr;
|
||||
ICommandProcessor *m_pProcessor = nullptr;
|
||||
std::atomic<uint64_t> m_TextureMemoryUsage{0};
|
||||
std::atomic<uint64_t> m_BufferMemoryUsage{0};
|
||||
|
|
Loading…
Reference in a new issue