fixes a 'null is not an object in appframework.js' exception

… in /ui/appframework.js, line 885

I've got this exception in my app. This patch fixes it and should not break anything.

Best regards
dom