1187 - NPE - Appears to be from no app context

The line nums in the report don't match exactly with the code (form what I can see), but it appears to be a null app context is causing this.
#1187