mirror of
https://github.com/lbonn/rofi
synced 2024-11-10 14:24:27 +00:00
Fix some warning that converity scan picked up.
This commit is contained in:
parent
898b5466f0
commit
b227fece10
2 changed files with 8 additions and 2 deletions
|
@ -678,6 +678,10 @@ char *rofi_expand_path ( const char *input )
|
|||
|
||||
unsigned int levenshtein ( const char *needle, const glong needlelen, const char *haystack, const glong haystacklen )
|
||||
{
|
||||
if ( needlelen == G_MAXLONG ){
|
||||
// String to long, we cannot handle this.
|
||||
return UINT_MAX;
|
||||
}
|
||||
unsigned int column[needlelen + 1];
|
||||
for ( glong y = 0; y <= needlelen; y++ ) {
|
||||
column[y] = y;
|
||||
|
|
|
@ -238,7 +238,9 @@ static void rofi_theme_print_index ( ThemeWidget *widget )
|
|||
}
|
||||
void rofi_theme_print ( ThemeWidget *widget )
|
||||
{
|
||||
rofi_theme_print_index ( widget );
|
||||
if ( widget != NULL ) {
|
||||
rofi_theme_print_index ( widget );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -382,7 +384,7 @@ Property *rofi_theme_find_property ( ThemeWidget *widget, PropertyType type, con
|
|||
// Resolve link.
|
||||
rofi_theme_resolve_link_property ( p, 0 );
|
||||
}
|
||||
if ( p->value.link.ref->type == type ) {
|
||||
if ( p->value.link.ref != NULL && p->value.link.ref->type == type ) {
|
||||
return p->value.link.ref;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue