1
0
Fork 0
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:
Dave Davenport 2017-11-05 21:32:43 +01:00
parent 5a3b642cf7
commit e689f2d98b

View file

@ -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 );