From 75be7a31805dc9e7edca7e28ceb0a03ceafae6ba Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Tue, 7 Oct 2014 11:59:02 +0200 Subject: [PATCH] Make sure the module still exists before compacting its data. --- pandora_server/util/pandora_db.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index a053e663ca..4c4edadc3e 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -437,6 +437,7 @@ sub pandora_compactdb ($$) { my $id_module = $data->{'id_agente_modulo'}; if (! defined($module_proc_hash{$id_module})) { my $module_type = get_db_value ($dbh, 'SELECT id_tipo_modulo FROM tagente_modulo WHERE id_agente_modulo = ?', $id_module); + next unless defined ($module_type); # Mark proc modules. if ($module_type == 2 || $module_type == 6 || $module_type == 9 || $module_type == 18 || $module_type == 21 || $module_type == 31) {