Fix errors found by valgrind.
This commit is contained in:
parent
e637da4b77
commit
95f8a8905a
|
@ -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
|
||||
|
|
|
@ -47,6 +47,6 @@ clean:
|
|||
rm -f $(OBJS) timeline makedepend
|
||||
|
||||
valgrind:
|
||||
valgrind ./test
|
||||
valgrind ./timeline
|
||||
|
||||
include makedepend
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue