Skip to content

Commit

Permalink
added check to see if instruments is not null
Browse files Browse the repository at this point in the history
  • Loading branch information
snevesbarros committed Nov 9, 2013
1 parent a5a201f commit 25b164d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/appium.js
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ Appium.prototype.stop = function(cb) {
logger.info('Shutting down appium session...');
if (this.isSafariLauncherApp === true) {
this.device.leaveWebView(function() {
if (this.device.udid === null) {
if (this.device.udid === null && this.device.instruments !== null) {
this.device.instruments.shutdown(function() {
this.cleanupSession(null, cb);
}.bind(this));
Expand Down

0 comments on commit 25b164d

Please sign in to comment.