提交 dda011a1 编写于 作者: O openeuler-ci-bot 提交者: Gitee

!94 fixed code check bugs

Merge pull request !94 from 韦德立/master
...@@ -98,7 +98,7 @@ bool ChecksumCalculatorThreadInfo::writeChecksum(const void* buf, ...@@ -98,7 +98,7 @@ bool ChecksumCalculatorThreadInfo::writeChecksum(const void* buf,
bool ChecksumCalculatorThreadInfo::validate(const void* buf, bool ChecksumCalculatorThreadInfo::validate(const void* buf,
size_t bufLen, size_t bufLen,
void* checksum, const void* checksum,
size_t checksumLen) { size_t checksumLen) {
bool ret = false; bool ret = false;
if(getChecksumCalculatorThreadInfo() != nullptr) { if(getChecksumCalculatorThreadInfo() != nullptr) {
......
...@@ -43,7 +43,7 @@ public: ...@@ -43,7 +43,7 @@ public:
static bool validate(const void* buf, static bool validate(const void* buf,
size_t bufLen, size_t bufLen,
void* checksum, const void* checksum,
size_t checksumLen); size_t checksumLen);
static void validOrDie(const void* buf, static void validOrDie(const void* buf,
size_t bufLen, size_t bufLen,
......
...@@ -39,6 +39,7 @@ class IpConfigBuilder { ...@@ -39,6 +39,7 @@ class IpConfigBuilder {
}; };
IpConfigBuilder() = default; IpConfigBuilder() = default;
~IpConfigBuilder(){}
std::size_t write(common::BinaryWriter &writer); std::size_t write(common::BinaryWriter &writer);
......
...@@ -295,6 +295,9 @@ bool ColorBuffer::blitFromCurrentReadBuffer() { ...@@ -295,6 +295,9 @@ bool ColorBuffer::blitFromCurrentReadBuffer() {
s_gles2.glViewport(0, 0, m_width, m_height); s_gles2.glViewport(0, 0, m_width, m_height);
// render m_blitTex // render m_blitTex
if (!m_helper->getTextureDraw()) {
return false;
}
m_helper->getTextureDraw()->draw(m_blitTex); m_helper->getTextureDraw()->draw(m_blitTex);
// Restore previous viewport. // Restore previous viewport.
......
...@@ -431,6 +431,9 @@ HandleType Renderer::createRenderContext(int p_config, HandleType p_share, ...@@ -431,6 +431,9 @@ HandleType Renderer::createRenderContext(int p_config, HandleType p_share,
ret = genHandle(); ret = genHandle();
m_contexts[ret] = rctx; m_contexts[ret] = rctx;
RenderThreadInfo *tinfo = RenderThreadInfo::get(); RenderThreadInfo *tinfo = RenderThreadInfo::get();
if (!tinfo) {
return -1;
}
int tid = tinfo->m_tid; int tid = tinfo->m_tid;
// The new emulator manages render contexts per guest process. // The new emulator manages render contexts per guest process.
// Fall back to per-thread management if the system image does not // Fall back to per-thread management if the system image does not
...@@ -511,6 +514,9 @@ void Renderer::DestroyRenderContext(HandleType p_context) { ...@@ -511,6 +514,9 @@ void Renderer::DestroyRenderContext(HandleType p_context) {
m_contexts.erase(p_context); m_contexts.erase(p_context);
RenderThreadInfo *tinfo = RenderThreadInfo::get(); RenderThreadInfo *tinfo = RenderThreadInfo::get();
if (!tinfo) {
return;
}
int tid = tinfo->m_tid; int tid = tinfo->m_tid;
// The new emulator manages render contexts per guest process. // The new emulator manages render contexts per guest process.
// Fall back to per-thread management if the system image does not // Fall back to per-thread management if the system image does not
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册