Show
Ignore:
Timestamp:
10/01/09 22:19:42 (5 years ago)
Author:
robert
Message:

Introduced new BufferObject? design + implementation in preperation of implementing a pool system for buffer objects

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/ive/DrawElementsUByte.cpp

    r7648 r10600  
    3434    // Write array length and its elements. 
    3535    out->writeInt(size()); 
    36     out->writeCharArray((const char*)&front(), size() * CHARSIZE); 
     36    if (size()!=0) out->writeCharArray((const char*)&front(), size() * CHARSIZE); 
    3737} 
    3838 
     
    5454        int size = in->readInt(); 
    5555        resize(size); 
    56         in->readCharArray((char*)&front(), size * CHARSIZE); 
     56        if (size!=0) in->readCharArray((char*)&front(), size * CHARSIZE); 
    5757 
    5858    }