Changeset 3358

Show
Ignore:
Timestamp:
04/08/07 09:06:26 (6 years ago)
Author:
balister
Message:

Fix crash in SPDImplementation parser.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • ossie/trunk/ossie/parser/SPDImplementation.cpp

    r3353 r3358  
    9898    setCodeType (code->Attribute("type")); 
    9999 
    100     TiXmlElement *local = elem->FirstChildElement("localfile"); 
     100    TiXmlElement *local = code->FirstChildElement("localfile"); 
    101101    codeFile = local->Attribute("name"); 
    102102 
     
    121121    std::string str = _ct; 
    122122 
    123     if (_ct == "KernelModule") 
     123    if (str == "KernelModule") 
    124124        codeType = CF::LoadableDevice::KERNEL_MODULE; 
    125     else if (_ct == "SharedLibrary") 
     125    else if (str == "SharedLibrary") 
    126126        codeType = CF::LoadableDevice::SHARED_LIBRARY; 
    127     else if (_ct == "Executable") 
     127    else if (str == "Executable") 
    128128        codeType = CF::LoadableDevice::EXECUTABLE; 
    129     else if (_ct == "Driver") 
     129    else if (str == "Driver") 
    130130        codeType = CF::LoadableDevice::DRIVER; 
    131131    else { 
    132         DEBUG(1, SPDImplementation, "Bad code type found in xml file."); 
     132        DEBUG(1, SPDImplementation, "Bad code type " << str << " found in xml file."); 
    133133            //throw new SCA.CF.InvalidProfile(msg); 
    134134    }