Merge pull request #1495 from bootstraponline/fix_null_crash

Avoid crashing when device is null
This commit is contained in:
Jonathan Lipps
2013-11-18 17:36:37 -08:00
+2 -1
View File
@@ -727,7 +727,8 @@ Appium.prototype.reset = function(cb) {
this.resetting = true;
this.stop(function() {
logger.info("Restarting app");
this.start(this.oldDesiredCapabilities, function() {
this.start(this.oldDesiredCapabilities, function(err) {
if (err) return cb(err);
this.resetting = false;
this.device.implicitWaitMs = oldImpWait;
this.sessionId = oldId;