mirror of
https://github.com/fltk/fltk.git
synced 2026-06-04 23:42:15 +08:00
Fix uninitialized variable in Fl_Preferences::Node::remove.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2128 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
+9
-10
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Preferences.cxx,v 1.1.2.1 2002/04/28 16:41:16 easysw Exp $"
|
// "$Id: Fl_Preferences.cxx,v 1.1.2.2 2002/04/29 15:12:23 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Preferences file for the Fast Light Tool Kit (FLTK).
|
// Preferences file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -803,13 +803,10 @@ const char *Fl_Preferences::Node::child( int ix )
|
|||||||
int Fl_Preferences::Node::remove()
|
int Fl_Preferences::Node::remove()
|
||||||
{
|
{
|
||||||
Node *nd, *np;
|
Node *nd, *np;
|
||||||
if ( parent_ )
|
if ( parent_ ) {
|
||||||
{
|
nd = parent_->child_; np = 0;
|
||||||
nd = parent_->child_; np = 0L;
|
for ( ; nd; nd = nd->next_ ) {
|
||||||
for ( ; nd; nd = nd->next_ )
|
if ( nd == this ) {
|
||||||
{
|
|
||||||
if ( nd == this )
|
|
||||||
{
|
|
||||||
if ( np )
|
if ( np )
|
||||||
np->next_ = nd->next_;
|
np->next_ = nd->next_;
|
||||||
else
|
else
|
||||||
@@ -817,12 +814,14 @@ int Fl_Preferences::Node::remove()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else nd = 0;
|
||||||
|
|
||||||
delete this;
|
delete this;
|
||||||
|
|
||||||
return ( nd != 0 );
|
return ( nd != 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Preferences.cxx,v 1.1.2.1 2002/04/28 16:41:16 easysw Exp $".
|
// End of "$Id: Fl_Preferences.cxx,v 1.1.2.2 2002/04/29 15:12:23 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user