Index: /trunk/src/VBox/Main/SnapshotImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/SnapshotImpl.cpp	(revision 29539)
+++ /trunk/src/VBox/Main/SnapshotImpl.cpp	(revision 29540)
@@ -1703,12 +1703,4 @@
     }
 
-    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    /* discard all current changes to mUserData (name, OSType etc.) (note that
-     * the machine is powered off, so there is no need to inform the direct
-     * session) */
-    if (mData->flModifications)
-        rollback(false /* aNotify */);
-
     HRESULT rc = S_OK;
 
@@ -1718,4 +1710,12 @@
     try
     {
+        AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+        /* Discard all current changes to mUserData (name, OSType etc.).
+         * Note that the machine is powered off, so there is no need to inform
+         * the direct session. */
+        if (mData->flModifications)
+            rollback(false /* aNotify */);
+
         /* Delete the saved state file if the machine was Saved prior to this
          * operation */
