Changeset 11727:78a05eef3f20 in orange


Ignore:
Timestamp:
10/10/13 11:57:19 (7 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Fixed a bug in Table iteration after deleting all elements.

(fixes #1333)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/orange/table.cpp

    r11703 r11727  
    375375  memmove(ptr, ptr+1, sizeof(TExample **)*(_Last - ptr - 1)); 
    376376  _Last--; 
     377 
     378  shrinkTable(); 
    377379  examplesHaveChanged(); 
    378380} 
     
    417419TExampleIterator TExampleTable::begin() 
    418420{ 
    419   return TExampleIterator(this, examples ? *examples : NULL, (void *)examples); 
     421  return TExampleIterator(this, (examples && examples != _Last) ? *examples : NULL, (void *)examples); 
    420422} 
    421423 
Note: See TracChangeset for help on using the changeset viewer.