mirror of
https://github.com/davatorium/rofi.git
synced 2025-03-10 17:06:37 -04:00
Check result g_key_file_load_from_file to make coverity happy.
This commit is contained in:
parent
5a3b642cf7
commit
e689f2d98b
1 changed files with 6 additions and 1 deletions
|
@ -267,7 +267,12 @@ static gboolean read_desktop_file ( DRunModePrivateData *pd, const char *root, c
|
|||
}
|
||||
GKeyFile *kf = g_key_file_new ();
|
||||
GError *error = NULL;
|
||||
g_key_file_load_from_file ( kf, path, 0, &error );
|
||||
gboolean res = g_key_file_load_from_file ( kf, path, 0, &error );
|
||||
if ( !res && error == NULL) {
|
||||
g_debug ( "Failed to parse desktop file: %s because: unknown.", path );
|
||||
g_key_file_free ( kf );
|
||||
return FALSE;
|
||||
}
|
||||
// If error, skip to next entry
|
||||
if ( error != NULL ) {
|
||||
g_debug ( "Failed to parse desktop file: %s because: %s", path, error->message );
|
||||
|
|
Loading…
Add table
Reference in a new issue