diff options
author | Timm Bäder <mail@baedert.org> | 2020-10-15 06:05:39 +0200 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2020-10-22 17:46:33 +0200 |
commit | 3a1e019e83595b747d4734dd32d98511b31413e0 (patch) | |
tree | 085081e14714bf0e972f236a6428ff7b797c1abb | |
parent | a923be95b36f1303a90d232c55b6f373c3fa8f3e (diff) | |
download | gtk+-3a1e019e83595b747d4734dd32d98511b31413e0.tar.gz |
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
-rw-r--r-- | demos/print-editor/print-editor.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/demos/print-editor/print-editor.c b/demos/print-editor/print-editor.c index 416ff9db31..a0c8da320d 100644 --- a/demos/print-editor/print-editor.c +++ b/demos/print-editor/print-editor.c @@ -164,7 +164,7 @@ save_file (GFile *save_filename) NULL, &error); - if (error != NULL) + if (error == NULL) { if (save_filename != filename) { |