Adding nullchecks to resources.cpp in order to fix crashes that occur when specifying...