Index: /trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 50856)
+++ /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 50857)
@@ -20569,4 +20569,5 @@
       <see><link to="ISnapshot"/></see>
     </desc>
+    <attribute name="midlDoesNotLikEmptyInterfaces" readonly="yes" type="boolean"/>
   </interface>
 
@@ -20587,4 +20588,5 @@
       <see><link to="ISnapshot"/></see>
     </desc>
+    <attribute name="midlDoesNotLikEmptyInterfaces" readonly="yes" type="boolean"/>
   </interface>
 
@@ -20598,4 +20600,5 @@
       <see><link to="ISnapshot"/></see>
     </desc>
+    <attribute name="midlDoesNotLikEmptyInterfaces" readonly="yes" type="boolean"/>
   </interface>
 
@@ -20756,4 +20759,5 @@
       find out what has changed.
     </desc>
+    <attribute name="midlDoesNotLikEmptyInterfaces" readonly="yes" type="boolean"/>
   </interface>
 
@@ -20822,4 +20826,5 @@
       changes.
     </desc>
+    <attribute name="midlDoesNotLikEmptyInterfaces" readonly="yes" type="boolean"/>
   </interface>
 
@@ -21314,4 +21319,5 @@
     </desc>
 
+    <attribute name="midlDoesNotLikEmptyInterfaces" readonly="yes" type="boolean"/>
   </interface>
 
@@ -21342,4 +21348,5 @@
     </desc>
 
+    <attribute name="midlDoesNotLikEmptyInterfaces" readonly="yes" type="boolean"/>
   </interface>
 
@@ -21355,4 +21362,5 @@
       find out what has changed.
     </desc>
+    <attribute name="midlDoesNotLikEmptyInterfaces" readonly="yes" type="boolean"/>
   </interface>
 
@@ -21367,4 +21375,5 @@
       attributes to find out what is the current status.
     </desc>
+    <attribute name="midlDoesNotLikEmptyInterfaces" readonly="yes" type="boolean"/>
   </interface>
 
@@ -21377,4 +21386,5 @@
       Notification when video capture settings have changed.
     </desc>
+    <attribute name="midlDoesNotLikEmptyInterfaces" readonly="yes" type="boolean"/>
   </interface>
 
@@ -21390,4 +21400,5 @@
       find out what has changed.
     </desc>
+    <attribute name="midlDoesNotLikEmptyInterfaces" readonly="yes" type="boolean"/>
   </interface>
 
@@ -21668,4 +21679,5 @@
       <link to="IConsole::state">machine state</link> change.
     </desc>
+    <attribute name="midlDoesNotLikEmptyInterfaces" readonly="yes" type="boolean"/>
   </interface>
 
@@ -22033,4 +22045,5 @@
     wsmap="managed" autogen="VBoxEvent" id="OnHostNameResolutionConfigurationChange"
     >
+    <attribute name="midlDoesNotLikEmptyInterfaces" readonly="yes" type="boolean"/>
   </interface>
 
Index: /trunk/src/VBox/Main/idl/comimpl.xsl
===================================================================
--- /trunk/src/VBox/Main/idl/comimpl.xsl	(revision 50856)
+++ /trunk/src/VBox/Main/idl/comimpl.xsl	(revision 50857)
@@ -269,5 +269,5 @@
   </xsl:choose>
 
-  <xsl:for-each select="//interface[@name=$name]/attribute">
+  <xsl:for-each select="//interface[@name=$name]/attribute[@name != 'midlDoesNotLikEmptyInterfaces']">
     <xsl:variable name="aName" select="concat('a_',@name)"/>
     <xsl:variable name="aTypeName">
@@ -583,4 +583,12 @@
     </xsl:otherwise>
   </xsl:choose>
+
+  <!-- Before we generate attribute code, we check and make sure there are attributes here. -->
+  <xsl:if test="count(attribute) = 0 and @name != 'INATNetworkAlterEvent'">
+    <xsl:call-template name="fatalError">
+      <xsl:with-param name="msg">error: <xsl:value-of select="@name"/> has no attributes</xsl:with-param>
+    </xsl:call-template>
+  </xsl:if>
+
   <xsl:call-template name="genAttrCode">
     <xsl:with-param name="name" select="@name" />
@@ -767,5 +775,5 @@
   </xsl:choose>
 
-  <xsl:for-each select="//interface[@name=$name]/attribute">
+  <xsl:for-each select="//interface[@name=$name]/attribute[@name != 'midlDoesNotLikEmptyInterfaces']">
     <xsl:variable name="aName" select="concat('a_',@name)"/>
     <xsl:variable name="aTypeName">
@@ -805,5 +813,5 @@
   </xsl:choose>
 
-  <xsl:for-each select="//interface[@name=$name]/attribute">
+  <xsl:for-each select="//interface[@name=$name]/attribute[@name != 'midlDoesNotLikEmptyInterfaces']">
     <xsl:variable name="aName" select="concat('a_',@name)"/>
     <xsl:choose>
