From 932cdbf84f47be25907b48e54702bfc20dcab18e Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Wed, 15 Jan 2014 12:59:27 -0500 Subject: [PATCH] VBOX: When checking to see if a VM is registered, take into account the return value of vboxmanage. --- samples/vboxwrapper/vbox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/vboxwrapper/vbox.cpp b/samples/vboxwrapper/vbox.cpp index 043c31e17c..ff1290caa2 100644 --- a/samples/vboxwrapper/vbox.cpp +++ b/samples/vboxwrapper/vbox.cpp @@ -1599,7 +1599,7 @@ bool VBOX_VM::is_registered() { retval = vbm_popen(command, output, "registration", false, false); // Handle explicit cases first - if (output.find(needle.c_str()) != string::npos) { + if (!retval && output.find(needle.c_str()) != string::npos) { return true; } if (output.find("VBOX_E_OBJECT_NOT_FOUND") != string::npos) {