diff --git a/res/res_hep.c b/res/res_hep.c
index 80863d332f74a8bdce37bebe1231e73a27bbc9e9..474e15d6afb9533930db138075aeab1e465dd227 100644
--- a/res/res_hep.c
+++ b/res/res_hep.c
@@ -532,7 +532,7 @@ int hepv3_send_packet(struct hepv3_capture_info *capture_info)
 	RAII_VAR(struct module_config *, config, ao2_global_obj_ref(global_config), ao2_cleanup);
 	int res;
 
-	if (!config->general->enabled) {
+	if (!config || !config->general->enabled) {
 		return 0;
 	}