mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-06-30 23:46:35 +00:00
filename-validator: Support NULL current-directory
There is no need to treat this as a programming error. Simply don't validade filename without a directory. This is going to be needed by the FileChooser in SAVE_FILE mode, if neither the client app nor the user has set a target directory yet.
This commit is contained in:
parent
b1d7eaf666
commit
98296d71cc
|
@ -252,7 +252,11 @@ void
|
|||
nautilus_filename_validator_validate (NautilusFilenameValidator *self)
|
||||
{
|
||||
g_return_if_fail (NAUTILUS_IS_FILENAME_VALIDATOR (self));
|
||||
g_return_if_fail (NAUTILUS_IS_DIRECTORY (self->containing_directory));
|
||||
|
||||
if (self->containing_directory == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
nautilus_directory_call_when_ready (self->containing_directory,
|
||||
NAUTILUS_FILE_ATTRIBUTE_INFO,
|
||||
|
|
Loading…
Reference in New Issue
Block a user