# HG changeset patch
# User Edouard Tisserant
# Date 1339677720 -7200
# Node ID 502939f9c477ea19e351ed2c16eff1a9c5e7d709
# Parent  fe47069f214c02d1dbf11622b4ff649e366392fd
Fixed crash when starting with no libraries at all

diff -r fe47069f214c -r 502939f9c477 ProjectController.py
--- a/ProjectController.py	Mon Jun 11 02:34:23 2012 +0200
+++ b/ProjectController.py	Thu Jun 14 14:42:00 2012 +0200
@@ -61,7 +61,7 @@
                 """+targets.GetTargetChoices()+"""
                 </xsd:choice>
               </xsd:complexType>
-            </xsd:element>
+            </xsd:element>"""+(("""
             <xsd:element name="Libraries" minOccurs="0">
               <xsd:complexType>
               """+"\n".join(['<xsd:attribute name='+
@@ -69,7 +69,7 @@
                              'type="xsd:boolean" use="optional" default="true"/>' 
                              for libname,lib in features.libraries])+"""
               </xsd:complexType>
-            </xsd:element>
+            </xsd:element>""") if len(features.libraries)>0 else '') + """
           </xsd:sequence>
           <xsd:attribute name="URI_location" type="xsd:string" use="optional" default=""/>
           <xsd:attribute name="Disable_Extensions" type="xsd:boolean" use="optional" default="false"/>