We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 168955d commit c6c0eacCopy full SHA for c6c0eac
1 file changed
src/com/javagamemaker/javagameengine/components/Component.java
@@ -463,13 +463,14 @@ public LinkedList<Component> getAllChildren(Component type){
463
}
464
465
public <T>T getChild(){
466
+ T t = null;
467
for (Component child : this.children){
468
try{
- return ((T)child);
469
+ t = ((T)child);
470
471
catch (Exception e){}
472
- return null;
473
+ return t;
474
475
/**
476
* @param type the specified type of the children to be returned
0 commit comments