Commit ee2c9c63 authored by Matthieu Muffato's avatar Matthieu Muffato
Browse files

bugfix: don't try to delete a parameter that doesn't exist

(cherry-picked from 2.5: 9112b933)
parent ccf0932d
......@@ -471,10 +471,13 @@ sub apply_tweaks {
print "Tweak.Show \tpipeline.param[$param_name] ::\t"
. ($hash_pair ? $hash_pair->{'param_value'} : '(missing_value)') . "\n";
} elsif($operator eq '#') {
$need_write = 1;
$pwp_collection->forget_and_mark_for_deletion( $hash_pair );
print "Tweak.Deleting\tpipeline.param[$param_name] ::\t".stringify($hash_pair->{'param_value'})." --> (missing value)\n";
if ($hash_pair) {
$need_write = 1;
$pwp_collection->forget_and_mark_for_deletion( $hash_pair );
print "Tweak.Deleting\tpipeline.param[$param_name] ::\t".stringify($hash_pair->{'param_value'})." --> (missing value)\n";
} else {
print "Tweak.Deleting\tpipeline.param[$param_name] skipped (does not exist)\n";
}
} else {
$need_write = 1;
my $new_value = destringify( $new_value_str );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment