Browse Source

dont lock texture if region is empty

dm 7 years ago
parent
commit
1835407f07
1 changed files with 3 additions and 0 deletions
  1. 3 0
      oxygine/src/oxygine/core/gl/NativeTextureGLES.cpp

+ 3 - 0
oxygine/src/oxygine/core/gl/NativeTextureGLES.cpp

@@ -363,6 +363,9 @@ namespace oxygine
 
     void NativeTextureGLES::updateRegion(int x, int y, const ImageData& data_)
     {
+		if (data_.w == 0 || data_.h == 0)
+			return;
+
         ImageData data = data_;
         assert(_width >= data.w - x);
         assert(_height >= data.h - y);