[glib] Fix a crash when a layer doesn't have a name

Fixes bug #28842.
1 file changed