[WHY]
-To ensure dc->res_pool has been initialized
[HOW]
-Check if dc->res_pool is true in
the if statement
Reviewed-by: Martin Leung <Martin.Leung@amd.com>
Acked-by: Pavle Kotarac <Pavle.Kotarac@amd.com>
Signed-off-by: Jarif Aftab <jaraftab@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
 static void dc_destruct(struct dc *dc)
 {
        // reset link encoder assignment table on destruct
-       if (dc->res_pool->funcs->link_encs_assign)
+       if (dc->res_pool && dc->res_pool->funcs->link_encs_assign)
                link_enc_cfg_init(dc, dc->current_state);
 
        if (dc->current_state) {