Fix errors found by valgrind.

This commit is contained in:
Jonathan Moore Liles 2008-04-28 11:48:35 -05:00
parent e637da4b77
commit 95f8a8905a
3 changed files with 7 additions and 3 deletions

View File

@ -343,7 +343,7 @@ Loggable::undo ( void )
_undo_index = ui + 2;
delete buf;
delete[] buf;
}
/** write a snapshot of the state of all loggable objects, sufficient

View File

@ -47,6 +47,6 @@ clean:
rm -f $(OBJS) timeline makedepend
valgrind:
valgrind ./test
valgrind ./timeline
include makedepend

View File

@ -51,7 +51,8 @@ pack_visible_height ( const Fl_Pack *p )
{
int th = 0;
for ( const Fl_Widget* const *w = p->array(); *w; ++w )
const Fl_Widget* const *w = p->array();
for ( int i = p->children(); i--; ++w )
if ( (*w)->visible() )
th += (*w)->h() + p->spacing();
@ -104,6 +105,9 @@ Timeline::Timeline ( int X, int Y, int W, int H, const char* L ) : Fl_Overlay_Wi
box( FL_FLAT_BOX );
xoffset = 0;
_yposition = 0;
_old_yposition = 0;
_old_xposition = 0;
X = Y = 0;