projects
/
platform
/
core
/
uifw
/
dali-adaptor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c00ea42
)
[Tizen] Add log to prevent invalid access to array
author
tscholb
<scholb.kim@samsung.com>
Mon, 1 Nov 2021 07:55:07 +0000
(16:55 +0900)
committer
tscholb
<scholb.kim@samsung.com>
Mon, 1 Nov 2021 07:55:13 +0000
(16:55 +0900)
This reverts commit
054fea682d92916f0c52b48ceb7e51bbe9d788c5
.
dali/internal/graphics/gles-impl/gles-context.cpp
patch
|
blob
|
history
diff --git
a/dali/internal/graphics/gles-impl/gles-context.cpp
b/dali/internal/graphics/gles-impl/gles-context.cpp
index
de5e058
..
f020e5b
100644
(file)
--- a/
dali/internal/graphics/gles-impl/gles-context.cpp
+++ b/
dali/internal/graphics/gles-impl/gles-context.cpp
@@
-29,6
+29,7
@@
#include "gles-graphics-render-target.h"
#include <map>
#include "gles-graphics-render-target.h"
#include <map>
+#include <assert.h>
namespace Dali::Graphics::GLES
{
namespace Dali::Graphics::GLES
{
@@
-864,6
+865,12
@@
void Context::ActiveTexture(uint32_t textureBindingIndex)
void Context::BindTexture(GLenum target, BoundTextureType textureTypeId, uint32_t textureId)
{
uint32_t typeId = static_cast<uint32_t>(textureTypeId);
void Context::BindTexture(GLenum target, BoundTextureType textureTypeId, uint32_t textureId)
{
uint32_t typeId = static_cast<uint32_t>(textureTypeId);
+ if(mImpl->mGlStateCache.mActiveTextureUnit >= MAX_TEXTURE_UNITS || typeId >= MAX_TEXTURE_TARGET)
+ {
+ DALI_LOG_ERROR("Invalid index (%d, %d)\n", mImpl->mGlStateCache.mActiveTextureUnit, typeId);
+ assert(0);
+ }
+
if(mImpl->mGlStateCache.mBoundTextureId[mImpl->mGlStateCache.mActiveTextureUnit][typeId] != textureId)
{
mImpl->mGlStateCache.mBoundTextureId[mImpl->mGlStateCache.mActiveTextureUnit][typeId] = textureId;
if(mImpl->mGlStateCache.mBoundTextureId[mImpl->mGlStateCache.mActiveTextureUnit][typeId] != textureId)
{
mImpl->mGlStateCache.mBoundTextureId[mImpl->mGlStateCache.mActiveTextureUnit][typeId] = textureId;