Index: /trunk/src/VBox/Main/MediumImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/MediumImpl.cpp	(revision 33759)
+++ /trunk/src/VBox/Main/MediumImpl.cpp	(revision 33760)
@@ -4230,5 +4230,5 @@
             break;
         default:
-            ComAssertFailedThrow(E_FAIL);
+            ComAssertFailedRet(VDTYPE_INVALID);
     }
 
@@ -4255,5 +4255,5 @@
             break;
         default:
-            ComAssertFailedThrow(E_FAIL);
+            ComAssertFailedRet(DeviceType_Null);
     }
 
Index: /trunk/src/VBox/Main/include/VirtualBoxBase.h
===================================================================
--- /trunk/src/VBox/Main/include/VirtualBoxBase.h	(revision 33759)
+++ /trunk/src/VBox/Main/include/VirtualBoxBase.h	(revision 33760)
@@ -265,4 +265,7 @@
 #define ComAssertComRCRetRC(rc)             \
     do { ComAssertComRC(rc); if (!SUCCEEDED(rc)) return (rc); } while (0)
+/** Special version of ComAssert that returns ret */
+#define ComAssertFailedRet(ret)                \
+    if (1) { ComAssertFailed(); { return (ret); } } else do {} while (0)
 
 
