Skip to content

Commit 660a518

Browse files
committed
scsynthexternal - only close log file if it exists
1 parent 0774e96 commit 660a518

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/server/sonicpi/lib/sonicpi/scsynthexternal.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def boot_and_wait(*args)
221221
log "Boot - Starting the SuperCollider server..."
222222
@scsynth_log_file = File.open(scsynth_log_path, 'w')
223223
@scsynth_log_file.puts "# Starting SuperCollider #{Time.now.strftime("%Y-%m-%d %H:%M:%S")}"
224-
at_exit { @scsynth_log_file.close }
224+
at_exit { @scsynth_log_file.close if @scsynth_log_file}
225225
scsynth_pipe = IO.popen(args)
226226
@scsynth_pid = scsynth_pipe.pid
227227

0 commit comments

Comments
 (0)