Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GifDecoder类有一部分代码存在问题,造成空引用的异常。 #8

Open
GoogleCodeExporter opened this issue Apr 23, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

GifDecoder类有一部分代码存在问题,造成空引用的异常。
int save = 0;
if (transparency) {
   save = act[transIndex];
   act[transIndex] = 0; // set transparent color if specified
}
if (act == null) {
   status = STATUS_FORMAT_ERROR; // no color table defined
}

act 是不是应该先判断是否为null?
if (transparency) {
   if(acr != null){
   save = act[transIndex];
   act[transIndex] = 0; // set transparent color if specified
}
}

Original issue reported on code.google.com by luoj...@gmail.com on 16 Nov 2011 at 6:44

@GoogleCodeExporter
Copy link
Author

if (transparency) {
   if(act != null && act.length > 0 && act.length > transIndex){
   save = act[transIndex];
   act[transIndex] = 0; // set transparent color if specified
}
}

Original comment by luoj...@gmail.com on 16 Nov 2011 at 6:49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant