mirror of
https://github.com/lc-soft/LCUI.git
synced 2026-11-30 16:48:21 +01:00
Add w->proto valid check for Widget_CheckType()
This commit is contained in:
@@ -112,6 +112,9 @@ LCUI_BOOL Widget_CheckType( LCUI_Widget w, const char *type )
|
||||
if( strcmp( w->type, type ) == 0 ) {
|
||||
return TRUE;
|
||||
}
|
||||
if( !w->proto ) {
|
||||
return FALSE;
|
||||
}
|
||||
for( proto = w->proto->proto; proto; proto = proto->proto ) {
|
||||
if( strcmp( proto->name, type ) == 0 ) {
|
||||
return TRUE;
|
||||
|
||||
Reference in New Issue
Block a user