[Uml-devel] [Bug 125331] crash loading xmi file created by older version

Oliver Kellogg okellogg at users.sourceforge.net
Thu May 11 11:20:03 UTC 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=125331         




------- Additional Comments From okellogg users sourceforge net  2006-05-11 20:19 -------
SVN commit 539791 by okellogg:

Attachment 16028 from Daniel Calviño Sánchez adds initialization of
UMLApp::m_policyext and check for NULL codegen pointer in UMLDoc::saveToXMI().
CCBUG:125331


 M  +1 -0      uml.cpp  
 M  +6 -5      umldoc.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/uml.cpp #539790:539791
 @ -88,6 +88,7  @
     m_clipTimer = 0;
     m_copyTimer = 0;
     m_codegen = 0;
+    m_policyext = 0;
     m_commoncodegenpolicy = 0;
     m_activeLanguage = Uml::pl_Reserved;
     ///////////////////////////////////////////////////////////////////
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/umldoc.cpp #539790:539791
 @ -1482,12 +1482,13  @
     //  save listview
     UMLApp::app()->getListView()->saveToXMI( doc, extensions, saveSubmodelFiles );
 
-    // save code generators
-    QDomElement codeGenElement = doc.createElement( "codegeneration" );
-    
+    // save code generator
     CodeGenerator *codegen = UMLApp::app()->getGenerator();
-    codegen->saveToXMI( doc, codeGenElement );
-    extensions.appendChild( codeGenElement );
+    if (codegen) {
+        QDomElement codeGenElement = doc.createElement( "codegeneration" );
+        codegen->saveToXMI( doc, codeGenElement );
+        extensions.appendChild( codeGenElement );
+    }
 
     root.appendChild( extensions );




More information about the umbrello-devel mailing list