From 31cd8ed9d2be00cd3622e91a989fbb5f3e6aa391 Mon Sep 17 00:00:00 2001 From: "XTra.KrazzY" Date: Fri, 30 Jan 2009 17:45:02 +0000 Subject: [PATCH] tiny fixes git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2041 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/PluginManager.cpp | 3 ++- Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp | 3 ++- Source/Plugins/Plugin_VideoOGL/Src/main.cpp | 4 ---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Source/Core/Core/Src/PluginManager.cpp b/Source/Core/Core/Src/PluginManager.cpp index 97aec817d8..d6db9f556f 100644 --- a/Source/Core/Core/Src/PluginManager.cpp +++ b/Source/Core/Core/Src/PluginManager.cpp @@ -347,7 +347,8 @@ Common::PluginVideo *CPluginManager::GetVideo() // ------------- Common::PluginVideo *CPluginManager::FreeVideo() { - delete m_video; + if(m_video) + delete m_video; m_video = NULL; m_video = (Common::PluginVideo*)LoadPlugin(m_params.m_strVideoPlugin.c_str(), 0); return m_video; diff --git a/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp b/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp index 6a7141f2b4..bf73221492 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp @@ -157,7 +157,8 @@ void Flush() GL_REPORT_ERRORD(); // setup the pointers - g_nativeVertexFmt->SetupVertexPointers(); + if(g_nativeVertexFmt) + g_nativeVertexFmt->SetupVertexPointers(); GL_REPORT_ERRORD(); // set the textures diff --git a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp index 4f6c7d9d57..3ad9d89a3c 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp @@ -196,10 +196,6 @@ void DllConfig(HWND _hParent) #endif } - -////////////////////////////////////////////////////////////////////////////////////////// -// Initialize video -// ŻŻŻŻŻŻŻŻŻŻ void Initialize(void *init) { // --------------------------------------------------