Merge pull request #2815 from minggo/master

fix a bug of Cocos2dxETCLoader.java
This commit is contained in:
minggo 2013-06-07 19:58:47 -07:00
commit cdf24ceba1
1 changed files with 4 additions and 2 deletions

View File

@ -65,7 +65,6 @@ public class Cocos2dxETCLoader {
texture = ETC1Util.createTexture(inputStream);
inputStream.close();
assetManager.close();
} catch (Exception e) {
Log.d("Cocos2dx", "Unable to create texture for " + filePath);
@ -73,6 +72,8 @@ public class Cocos2dxETCLoader {
}
if (texture != null) {
boolean ret = true;
try {
int width = texture.getWidth();
int height = texture.getHeight();
@ -88,9 +89,10 @@ public class Cocos2dxETCLoader {
} catch (Exception e)
{
Log.d("invoke native function error", e.toString());
ret = false;
}
return true;
return ret;
} else {
return false;
}