Skip to content

Commit

Permalink
Skip over empty Layout= assignments (#660)
Browse files Browse the repository at this point in the history
g_key_file_get_string() returns the empty string where the key exists
but isn't assigned to anything. Let's skip over that so we can have
.tablet files with an empty Layout= line.
  • Loading branch information
whot authored Apr 21, 2024
1 parent 37b105e commit 6b340d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libwacom/libwacom-database.c
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ libwacom_parse_tablet_keyfile(WacomDeviceDatabase *db,
}

layout = g_key_file_get_string(keyfile, DEVICE_GROUP, "Layout", NULL);
if (layout) {
if (layout && layout[0] != '\0') {
/* For the layout, we store the full path to the SVG layout */
device->layout = g_build_filename (datadir, "layouts", layout, NULL);
g_free (layout);
Expand Down

0 comments on commit 6b340d6

Please sign in to comment.