[gtk+/portal] Make sure fd is positive
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/portal] Make sure fd is positive
- Date: Thu, 7 Jul 2016 03:30:02 +0000 (UTC)
commit 6c68572c1e0192973a2336289782ce8ef740f496
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Jul 6 21:37:55 2016 -0400
Make sure fd is positive
gtk/gtkprintjob.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkprintjob.c b/gtk/gtkprintjob.c
index b53f46f..571d2b0 100644
--- a/gtk/gtkprintjob.c
+++ b/gtk/gtkprintjob.c
@@ -469,6 +469,7 @@ gtk_print_job_set_source_fd (GtkPrintJob *job,
GError **error)
{
g_return_val_if_fail (GTK_IS_PRINT_JOB (job), FALSE);
+ g_return_val_if_fail (fd >= 0, FALSE);
job->priv->spool_io = g_io_channel_unix_new (fd);
if (g_io_channel_set_encoding (job->priv->spool_io, NULL, error) != G_IO_STATUS_NORMAL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]