Changeset 19446


Ignore:
Timestamp:
Apr 18, 2010 3:09:12 AM (6 years ago)
Author:
chaitanya
Message:

Fix Mapinfo MIF driver to create layer defn at layer creation. (#3391)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.7/gdal/ogr/ogrsf_frmts/mitab/mitab_miffile.cpp

    r15756 r19446  
    424424        else
    425425            /* we leave it unknown indicating a mixture */;
     426    }
     427
     428    /* A newly created layer should have OGRFeatureDefn */
     429    if (m_poDefn == NULL)
     430    {
     431        char *pszFeatureClassName = TABGetBasename(m_pszFname);
     432        m_poDefn = new OGRFeatureDefn(pszFeatureClassName);
     433        CPLFree(pszFeatureClassName);
     434        // Ref count defaults to 0... set it to 1
     435        m_poDefn->Reference();
    426436    }
    427437
Note: See TracChangeset for help on using the changeset viewer.