Some additional null checks while I'm in the area.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9517 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
PSp..om 13 years ago
parent 11f686b1e0
commit 53dd4c2941
  1. 6
      engine/src/core/com/jme3/post/FilterPostProcessor.java

@ -98,6 +98,9 @@ public class FilterPostProcessor implements SceneProcessor, Savable {
* @param filter the filter to add
*/
public void addFilter(Filter filter) {
if (filter == null) {
throw new IllegalArgumentException( "Filter cannot be null." );
}
filters.add(filter);
if (isInitialized()) {
@ -113,6 +116,9 @@ public class FilterPostProcessor implements SceneProcessor, Savable {
* @param filter
*/
public void removeFilter(Filter filter) {
if (filter == null) {
throw new IllegalArgumentException( "Filter cannot be null." );
}
filters.remove(filter);
filter.cleanup(renderer);
updateLastFilterIndex();

Loading…
Cancel
Save