Don't crash if scheduleLeakCheck fails for #597

Signed-off-by: Ross Allan <rallanpcl@gmail.com>