Introduce a check for the resource data in order to avoid segfaulting on exit Signed-off-by: Felix Fietkau <nbd@nbd.name>