summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineOpenGL
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-09-15 22:03:50 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-09-15 22:03:50 +0000
commit27a8812b4e554c54cd102b785b003234893456ee (patch)
tree7f4cc21fa595ab69e563317f211e8140513d4512 /Graphics/GraphicsEngineOpenGL
parentFixed windows/linux build warnings (diff)
downloadDiligentCore-27a8812b4e554c54cd102b785b003234893456ee.tar.gz
DiligentCore-27a8812b4e554c54cd102b785b003234893456ee.zip
Fixed one more gcc warning
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/ShaderGLImpl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/src/ShaderGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/ShaderGLImpl.cpp
index bb190b49..5052e984 100644
--- a/Graphics/GraphicsEngineOpenGL/src/ShaderGLImpl.cpp
+++ b/Graphics/GraphicsEngineOpenGL/src/ShaderGLImpl.cpp
@@ -96,7 +96,8 @@ ShaderGLImpl::ShaderGLImpl(IReferenceCounters *pRefCounters, RenderDeviceGLImpl
// infoLogLen accounts for null terminator
auto *pOutputDataBlob = MakeNewRCObj<DataBlobImpl>()(infoLogLen + FullSource.length() + 1);
char* DataPtr = reinterpret_cast<char*>(pOutputDataBlob->GetDataPtr());
- memcpy(DataPtr, !infoLog.empty() ? infoLog.data() : nullptr, infoLogLen);
+ if (infoLogLen > 0)
+ memcpy(DataPtr, infoLog.data(), infoLogLen);
memcpy(DataPtr + infoLogLen, FullSource.data(), FullSource.length() + 1);
pOutputDataBlob->QueryInterface(IID_DataBlob, reinterpret_cast<IObject**>(CreationAttribs.ppCompilerOutput));
}