From 9c6f2e592e087b39b84afe3a33c60d474b19fa58 Mon Sep 17 00:00:00 2001 From: phosit Date: Sun, 21 Jan 2024 14:29:30 +0000 Subject: [PATCH] Don't check memory allocation made using new Refs: #5288 Patch By: @animus Accepted By: @phosit Comments By: @vladislavbelov Differential Revision: https://code.wildfiregames.com/D5234 This was SVN commit r28014. --- source/graphics/TerrainTextureEntry.cpp | 4 ++-- source/soundmanager/SoundManager.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/graphics/TerrainTextureEntry.cpp b/source/graphics/TerrainTextureEntry.cpp index c5043dff39..b5fcb3e281 100644 --- a/source/graphics/TerrainTextureEntry.cpp +++ b/source/graphics/TerrainTextureEntry.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2022 Wildfire Games. +/* Copyright (C) 2024 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -113,7 +113,7 @@ CTerrainTextureEntry::CTerrainTextureEntry(CTerrainPropertiesPtr properties, con { CTerrainPropertiesPtr ret (new CTerrainProperties(properties)); ret->LoadXml(child, &XeroFile, path); - if (ret) m_pProperties = ret; + m_pProperties = ret; } else if (child_name == el_tag) { diff --git a/source/soundmanager/SoundManager.cpp b/source/soundmanager/SoundManager.cpp index 1b2af6aeb4..57000f7e74 100644 --- a/source/soundmanager/SoundManager.cpp +++ b/source/soundmanager/SoundManager.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 Wildfire Games. +/* Copyright (C) 2024 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -550,7 +550,7 @@ ISoundItem* CSoundManager::ItemForData(CSoundData* itemData) answer = new CStreamItem(itemData); } - if (answer && m_Worker) + if (m_Worker) m_Worker->addItem(answer); }