diff --git a/Engine/lib/nativeFileDialogs/nfd_gtk.c b/Engine/lib/nativeFileDialogs/nfd_gtk.c index 2d7b9b5f6..fd15a86dd 100644 --- a/Engine/lib/nativeFileDialogs/nfd_gtk.c +++ b/Engine/lib/nativeFileDialogs/nfd_gtk.c @@ -47,10 +47,14 @@ static void AddFiltersToDialog( GtkWidget *dialog, const char *filterList ) if ( NFDi_IsFilterSegmentChar(*p_filterList) ) { char typebufWildcard[NFD_MAX_STRLEN]; - /* add another type to the filter */ - assert( strlen(typebuf) > 0 ); - assert( strlen(typebuf) < NFD_MAX_STRLEN-1 ); + /* add another type to the filter */ + if (strlen(typebuf) <= 0 || strlen(typebuf) > NFD_MAX_STRLEN-1) + { + p_filterList++; + continue; + } + snprintf( typebufWildcard, NFD_MAX_STRLEN, "*.%s", typebuf ); AddTypeToFilterName( typebuf, filterName, NFD_MAX_STRLEN );