Browse Source

Bail out of component chains if one returns null

Fixes issue 3903

Change-Id: I60820f7fa781c88377ccd0ef7339bd26badd4d81
Reviewed-on: http://gerrit.dmdirc.com/1066
Automatic-Compile: DMDirc Local Commits <dmdirc@googlemail.com>
Reviewed-by: Gregory Holmes <greg@dmdirc.com>
tags/0.6.4rc1
Chris Smith 14 years ago
parent
commit
6733cdce62
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      src/com/dmdirc/actions/ActionComponentChain.java

+ 4
- 0
src/com/dmdirc/actions/ActionComponentChain.java View File

75
         Object res = argument;
75
         Object res = argument;
76
         
76
         
77
         for (ActionComponent component : components) {
77
         for (ActionComponent component : components) {
78
+            if (res == null) {
79
+                return null;
80
+            }
81
+            
78
             res = component.get(res);
82
             res = component.get(res);
79
         }
83
         }
80
         
84
         

Loading…
Cancel
Save