mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-06-01 11:06:30 +03:00
Bad memory access fix.
This commit is contained in:
@@ -87,11 +87,13 @@ void UIMenuCheckBox::setActive( const bool& active ) {
|
||||
}
|
||||
|
||||
if ( oActive != active ) {
|
||||
UIMenu* Menu = getParent()->asType<UIMenu>();
|
||||
if ( getParent()->isType( UI_TYPE_MENU ) ) {
|
||||
UIMenu* menu = getParent()->asType<UIMenu>();
|
||||
|
||||
if ( !Menu->widgetCheckSize( this ) ) {
|
||||
if ( NULL != getIcon()->getDrawable() ) {
|
||||
setPadding( Rectf( 0, 0, 0, 0 ) );
|
||||
if ( !menu->widgetCheckSize( this ) ) {
|
||||
if ( NULL != getIcon()->getDrawable() ) {
|
||||
setPadding( Rectf( 0, 0, 0, 0 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -92,21 +92,23 @@ void UIMenuRadioButton::setActive( const bool& active ) {
|
||||
}
|
||||
}
|
||||
|
||||
UIMenu* Menu = getParent()->asType<UIMenu>();
|
||||
if ( getParent()->isType( UI_TYPE_MENU ) ) {
|
||||
UIMenu* menu = getParent()->asType<UIMenu>();
|
||||
|
||||
if ( !Menu->widgetCheckSize( this ) ) {
|
||||
if ( NULL != getIcon()->getDrawable() ) {
|
||||
setPadding( Rectf( 0, 0, 0, 0 ) );
|
||||
}
|
||||
}
|
||||
|
||||
if ( mActive ) {
|
||||
Node* child = Menu->getFirstChild();
|
||||
while ( child ) {
|
||||
if ( child->isType( UI_TYPE_MENURADIOBUTTON ) && child != this ) {
|
||||
child->asType<UIMenuRadioButton>()->setActive( false );
|
||||
if ( !menu->widgetCheckSize( this ) ) {
|
||||
if ( NULL != getIcon()->getDrawable() ) {
|
||||
setPadding( Rectf( 0, 0, 0, 0 ) );
|
||||
}
|
||||
}
|
||||
|
||||
if ( mActive ) {
|
||||
Node* child = menu->getFirstChild();
|
||||
while ( child ) {
|
||||
if ( child->isType( UI_TYPE_MENURADIOBUTTON ) && child != this ) {
|
||||
child->asType<UIMenuRadioButton>()->setActive( false );
|
||||
}
|
||||
child = child->getNextNode();
|
||||
}
|
||||
child = child->getNextNode();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user