Index: source/graphics/TextureConverter.cpp =================================================================== --- source/graphics/TextureConverter.cpp +++ source/graphics/TextureConverter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2015 Wildfire Games. +/* Copyright (C) 2019 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -510,7 +510,7 @@ shared_ptr file; AllocateAligned(file, size, maxSectorSize); memcpy(file.get(), &result->output.buffer[0], size); - if (m_VFS->CreateFile(result->dest, file, size) < 0) + if (m_VFS->CreateFile(result->dest, file, size) != INFO::OK) { // error writing file ok = false; Index: source/graphics/TextureManager.cpp =================================================================== --- source/graphics/TextureManager.cpp +++ source/graphics/TextureManager.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2018 Wildfire Games. +/* Copyright (C) 2019 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -361,8 +361,16 @@ } else { - LOGERROR("Texture failed to convert: \"%s\"", texture->m_Properties.m_Path.string8()); - texture->SetHandle(m_ErrorHandle); + if(texture != nullptr) + { + LOGERROR("Texture failed to convert: \"%s\"", texture->m_Properties.m_Path.string8()); + texture->SetHandle(m_ErrorHandle); + } + else + { + LOGERROR("Texture failed to convert: returned nullptr"); + return true; + } } texture->m_State = CTexture::LOADED; return true;