diff options
author | Jean Brefort <jean.brefort@normalesup.org> | 2007-09-21 14:50:06 +0000 |
---|---|---|
committer | Jean Bréfort <jbrefort@src.gnome.org> | 2007-09-21 14:50:06 +0000 |
commit | e7131b2f919ee4f33181b1d7b80a23e75dcbef14 (patch) | |
tree | 2ea46c03c81876ee9692bef7ac6758b5e637882a /gtk/gtkprintoperation.c | |
parent | 1752db289b4f9e19431630119908250d463bde3d (diff) | |
download | gtk+-e7131b2f919ee4f33181b1d7b80a23e75dcbef14.tar.gz |
abort printing when the range is NULL. (#478803)
2007-09-21 Jean Brefort <jean.brefort@normalesup.org>
* gtk/gtkprintoperation.c: (print_pages_idle): abort printing
when the range is NULL. (#478803)
svn path=/trunk/; revision=18853
Diffstat (limited to 'gtk/gtkprintoperation.c')
-rw-r--r-- | gtk/gtkprintoperation.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gtk/gtkprintoperation.c b/gtk/gtkprintoperation.c index 6ef30969be..1c3a1901f0 100644 --- a/gtk/gtkprintoperation.c +++ b/gtk/gtkprintoperation.c @@ -2098,6 +2098,11 @@ print_pages_idle (gpointer user_data) */ if (priv->print_pages == GTK_PRINT_PAGES_RANGES) { + if (priv->page_ranges == NULL) { + g_warning ("no pages to print"); + priv->cancelled = TRUE; + goto out; + } data->ranges = priv->page_ranges; data->num_ranges = priv->num_page_ranges; for (i = 0; i < data->num_ranges; i++) |