summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2020-10-15 06:05:39 +0200
committerTimm Bäder <mail@baedert.org>2020-10-22 17:46:33 +0200
commit3a1e019e83595b747d4734dd32d98511b31413e0 (patch)
tree085081e14714bf0e972f236a6428ff7b797c1abb
parenta923be95b36f1303a90d232c55b6f373c3fa8f3e (diff)
downloadgtk+-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.c2
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)
{