diff options
author | Manuel Carrasco Moñino <manuel.carrasco.m@gmail.com> | 2013-01-20 09:43:25 +0100 |
---|---|---|
committer | Manuel Carrasco Moñino <manuel.carrasco.m@gmail.com> | 2013-01-20 09:43:25 +0100 |
commit | 3969bc8418ace02065bcf1800f32bea70fe3ac09 (patch) | |
tree | 414f2487f73b64c57fc376049fb7432086477646 /gwtquery-core | |
parent | a3a4d5b2e555702b525570accc710c6d667b253e (diff) | |
download | gwtquery-3969bc8418ace02065bcf1800f32bea70fe3ac09.tar.gz gwtquery-3969bc8418ace02065bcf1800f32bea70fe3ac09.zip |
Fix NPE when passing null functions
Diffstat (limited to 'gwtquery-core')
-rw-r--r-- | gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java index f24f0672..11e6eff3 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java @@ -2007,9 +2007,11 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> { public GQuery each(Function... f) { if (f != null) { for (Function f1 : f) { - int i = 0; - for (Element e : elements) { - f1.f(e.<com.google.gwt.dom.client.Element> cast(), i++); + if (f1 != null) { + int i = 0; + for (Element e : elements) { + f1.f(e.<com.google.gwt.dom.client.Element> cast(), i++); + } } } } |