Sanity check the results of getController().
git-svn-id: https://samskivert.googlecode.com/svn/trunk@695 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: Controller.java,v 1.11 2002/03/21 00:53:38 mdb Exp $
|
// $Id: Controller.java,v 1.12 2002/04/07 21:59:25 shaper Exp $
|
||||||
//
|
//
|
||||||
// samskivert library - useful routines for java programs
|
// samskivert library - useful routines for java programs
|
||||||
// Copyright (C) 2001 Michael Bayne
|
// Copyright (C) 2001 Michael Bayne
|
||||||
@@ -325,6 +325,12 @@ public abstract class Controller
|
|||||||
if (source instanceof ControllerProvider) {
|
if (source instanceof ControllerProvider) {
|
||||||
Controller ctrl =
|
Controller ctrl =
|
||||||
((ControllerProvider)source).getController();
|
((ControllerProvider)source).getController();
|
||||||
|
if (ctrl == null) {
|
||||||
|
Log.warning("Provider returned null controller " +
|
||||||
|
"[provider=" + source + "].");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// if the controller returns true, it handled the
|
// if the controller returns true, it handled the
|
||||||
// action and we can call this business done
|
// action and we can call this business done
|
||||||
|
|||||||
Reference in New Issue
Block a user