Fixed crash on texture manager usage before initialization

This commit is contained in:
r.kuznetsov 2018-07-30 10:58:06 +03:00 committed by Arsentiy Milchakov
parent f8eb932230
commit 077fea7edb
2 changed files with 2 additions and 0 deletions

View file

@ -1423,6 +1423,7 @@ void FrontendRenderer::RenderTransitBackground()
dp::TextureManager::ColorRegion region;
m_texMng->GetColorRegion(df::GetColorConstant(kTransitBackgroundColor), region);
CHECK(region.GetTexture() != nullptr, ("Texture manager is not initialized"));
if (!m_transitBackground->IsInitialized())
{
auto prg = m_gpuProgramManager->GetProgram(gpu::Program::ScreenQuad);

View file

@ -1251,6 +1251,7 @@ private:
class FinishTexturesInitializationMessage : public Message
{
public:
bool IsGLContextDependent() const override { return true; }
Type GetType() const override { return Message::FinishTexturesInitialization; }
};