Просмотр исходного кода

Reset if we cannot open a file -- clients have no other recovery available.

Zachary Kotlarek 13 лет назад
Родитель
Сommit
376ca1b272
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      dmx/qt_player.pl

+ 6 - 0
dmx/qt_player.pl

@@ -173,6 +173,12 @@ sub load($$) {
 	push(@cmd, 'end tell');
 	my $doc = Audio::runApplescript(join("\n", @cmd));
 
+	# Reset if we cannot open -- something is out-of-sync
+	if (!$doc) {
+		init();
+		return;
+	}
+
 	# Clean up the document name
 	$doc =~ s/^\s*document //;
 	$doc =~ s/\s+$//;