Changeset 1929


Ignore:
Timestamp:
09/17/10 17:02:28 (14 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: s=sd.scantable('sddata()

s.nbeam(999) # unexisting scan number
s.ncycle(999)
s.nif(999)
s.npol(999)

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Fixed a bug in nbeam, ncycle, nif, and npol that causes seg fault.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Scantable.cpp

    r1919 r1929  
    543543    // take the first POLNO,IFNO,CYCLENO as nbeam shouldn't vary with these
    544544    Table t = table_(table_.col("SCANNO") == scanno);
     545    if ( t.nrow() == 0 ) return 0 ;
    545546    ROTableRow row(t);
    546547    const TableRecord& rec = row.get(0);
     
    563564    // take the first POLNO,BEAMNO,CYCLENO as nbeam shouldn't vary with these
    564565    Table t = table_(table_.col("SCANNO") == scanno);
     566    if ( t.nrow() == 0 ) return 0 ;
    565567    ROTableRow row(t);
    566568    const TableRecord& rec = row.get(0);
     
    584586    // take the first POLNO,IFNO,CYCLENO as nbeam shouldn't vary with these
    585587    Table t = table_(table_.col("SCANNO") == scanno);
     588    if ( t.nrow() == 0 ) return 0 ;
    586589    ROTableRow row(t);
    587590    const TableRecord& rec = row.get(0);
     
    611614  } else {
    612615    Table t = table_(table_.col("SCANNO") == scanno);
     616    if ( t.nrow() == 0 ) return 0 ;
    613617    ROTableRow row(t);
    614618    const TableRecord& rec = row.get(0);
Note: See TracChangeset for help on using the changeset viewer.