Skip to content

Commit f8dc9a7

Browse files
pyhalovsc0w
authored andcommitted
Account for NULL error when we see G_IO_STATUS_EOF
1 parent c6c1db0 commit f8dc9a7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

capplets/about-me/mate-about-me-password.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,10 @@ io_watch_stdout (GIOChannel *source, GIOCondition condition, PasswordDialog *pdi
436436
}
437437

438438
if (g_io_channel_read_chars (source, buf, BUFSIZE, &bytes_read, &error) != G_IO_STATUS_NORMAL) {
439-
g_warning ("IO Channel read error: %s", error->message);
440-
g_error_free (error);
439+
if (error) {
440+
g_warning ("IO Channel read error: %s", error->message);
441+
g_error_free (error);
442+
}
441443

442444
return TRUE;
443445
}

0 commit comments

Comments
 (0)