Browse Source

Only warn about invalid states when debugging

Zachary Kotlarek 13 years ago
parent
commit
92f81341d2
1 changed files with 3 additions and 1 deletions
  1. 3 1
      dmx/DMX.pm

+ 3 - 1
dmx/DMX.pm

@@ -245,7 +245,9 @@ sub readState($$$$) {
 			# Ignore invalid states
 			# Ignore invalid states
 			if (defined($valid)) {
 			if (defined($valid)) {
 				if (!defined($valid->{$state})) {
 				if (!defined($valid->{$state})) {
-					print STDERR 'Invalid state: ' . $state . "\n";
+					if ($DEBUG) {
+						print STDERR 'Invalid state: ' . $state . "\n";
+					}
 					next;
 					next;
 				}
 				}
 			}
 			}