From b300bc47aafce0a225274276f40ff6f1e7fb9c90 Mon Sep 17 00:00:00 2001 From: wargio Date: Wed, 17 Jan 2024 18:55:36 +0800 Subject: [PATCH] Fix warning due some archs only having the asm plugin --- librz/arch/analysis.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/librz/arch/analysis.c b/librz/arch/analysis.c index 995fcd14460..4dd11752691 100644 --- a/librz/arch/analysis.c +++ b/librz/arch/analysis.c @@ -130,7 +130,9 @@ RZ_API RzAnalysis *rz_analysis_new(void) { analysis->plugins = rz_list_new(); if (analysis->plugins) { for (i = 0; i < RZ_ARRAY_SIZE(analysis_static_plugins); i++) { - rz_analysis_plugin_add(analysis, analysis_static_plugins[i]->p_analysis); + if (analysis_static_plugins[i]->p_analysis) { + rz_analysis_plugin_add(analysis, analysis_static_plugins[i]->p_analysis); + } } } analysis->ht_global_var = ht_pp_new(NULL, global_kv_free, NULL);