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