diff --git a/src/gui/widget_prototype.c b/src/gui/widget_prototype.c index 5a462931..d83d3da7 100644 --- a/src/gui/widget_prototype.c +++ b/src/gui/widget_prototype.c @@ -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;