ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/XmlTools2/trunk/xmlpatch.cpp
(Generate patch)

Comparing XmlTools2/trunk/xmlpatch.cpp (file contents):
Revision 980 by s10k, Thu Mar 6 16:40:35 2014 UTC vs.
Revision 997 by s10k, Fri Apr 25 16:14:22 2014 UTC

# Line 76 | Line 76 | void XmlPatch::insertNodesOperation(cons
76              UtilXmlTools::getAllXpathElements(xPathExpression,this->document,nodesToInsertion);
77          }
78  
79 <        if(nodesToInsertion[0].type()==pugi::node_null){
79 >        if(nodesToInsertion.isEmpty() || nodesToInsertion[0].type()==pugi::node_null){
80  
81              QString errMessage;
82  
# Line 137 | Line 137 | void XmlPatch::removeNodesOperation(XmlF
137              UtilXmlTools::getAllXpathElements(xPathExpression,this->document,nodesToDeletion);
138          }
139  
140 <        if(nodesToDeletion[0].type()==pugi::node_null){
140 >        if(nodesToDeletion.isEmpty() || nodesToDeletion[0].type()==pugi::node_null){
141  
142              QString errMessage;
143  

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)