Skip to content

Commit

Permalink
Protect against calling .quit on the browser object twice. (#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern authored Jul 24, 2023
1 parent 1815d92 commit b231685
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/ferrum/browser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,11 @@ def restart
end

def quit
@client.close
@process.stop
@client = @process = @contexts = nil
if @client
@client.close
@process.stop
@client = @process = @contexts = nil
end
end

def resize(**options)
Expand Down

0 comments on commit b231685

Please sign in to comment.