print-editor: Fix a wrong comparison

If error is NULL, replacing the file contents worked and we don't
show the error dialog. The previous version pretty explicitly
dereferenced a NULL pointer by first ensuring that error is NULL and
then accessing error->message.

Found by scan-build
This commit is contained in:
Timm Bäder 2020-10-15 06:05:39 +02:00
parent a923be95b3
commit 3a1e019e83

View File

@ -164,7 +164,7 @@ save_file (GFile *save_filename)
NULL,
&error);
if (error != NULL)
if (error == NULL)
{
if (save_filename != filename)
{