Fix scramble tool
Change-Id: I7d5e8c5284851f536d0f667a4885e9895a2b9319
diff --git a/tools/scramble_korapxml.pl b/tools/scramble_korapxml.pl
index 95e727e..b20a77f 100644
--- a/tools/scramble_korapxml.pl
+++ b/tools/scramble_korapxml.pl
@@ -107,13 +107,14 @@
# stuffed in a hash as well.
# If no CSS rules are parsed, the file will just be copied.
-$rule_file = Mojo::File->new($rule_file);
+if ($rule_file) {
+ $rule_file = Mojo::File->new($rule_file);
+ if (-e $rule_file) {
+ my $rules = decode_json $rule_file->slurp;
-if (-e $rule_file) {
- my $rules = decode_json $rule_file->slurp;
-
- foreach my $rule (@$rules) {
- scramble(@$rule);
+ foreach my $rule (@$rules) {
+ scramble(@$rule);
+ };
};
};