summaryrefslogtreecommitdiff
path: root/src/VBox/Main/src-server/HostPower.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/Main/src-server/HostPower.cpp')
-rw-r--r--src/VBox/Main/src-server/HostPower.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/VBox/Main/src-server/HostPower.cpp b/src/VBox/Main/src-server/HostPower.cpp
index 981af22ed..830729a00 100644
--- a/src/VBox/Main/src-server/HostPower.cpp
+++ b/src/VBox/Main/src-server/HostPower.cpp
@@ -155,11 +155,13 @@ void HostPowerService::notify(HostPowerEvent aEvent)
continue;
/* Wait until the operation has been completed. */
- LONG iRc;
rc = progress->WaitForCompletion(-1);
if (SUCCEEDED(rc))
- progress->COMGETTER(ResultCode) (&iRc);
- rc = iRc;
+ {
+ LONG iRc;
+ progress->COMGETTER(ResultCode)(&iRc);
+ rc = iRc;
+ }
AssertMsg (SUCCEEDED(rc), ("SaveState WaitForCompletion "
"failed with %Rhrc (%#08X)\n", rc, rc));