Fix segfault in Schedule Editor. Not all recording rules are associated with a program and this pointer therefore needs to be checked first