Index: /trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp	(revision 37095)
+++ /trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp	(revision 37096)
@@ -2583,8 +2583,6 @@
     {
         settings::AttachedDevicesList &llAttachments = it3->llAttachedDevices;
-        settings::AttachedDevicesList::iterator it4;
-        for (it4 = llAttachments.begin();
-             it4 != llAttachments.end();
-             ++it4)
+        settings::AttachedDevicesList::iterator it4 = llAttachments.begin();
+        while (it4 != llAttachments.end())
         {
             if (  (   !fDVD
@@ -2593,5 +2591,8 @@
                   (   !fFloppy
                    && it4->deviceType == DeviceType_Floppy))
-                llAttachments.erase(it4++);
+            {
+                it4 = llAttachments.erase(it4);
+                continue;
+            }
             else if (it4->deviceType == DeviceType_HardDisk)
             {
@@ -2613,4 +2614,5 @@
                 }
             }
+            ++it4;
         }
     }
