1.1 diff -r cbc23650d9ca -r 745483d15215 tumble_input.c 1.2 --- a/tumble_input.c Tue Mar 25 09:36:56 2003 +0000 1.3 +++ b/tumble_input.c Tue Mar 25 09:38:08 2003 +0000 1.4 @@ -2,7 +2,7 @@ 1.5 * tumble: build a PDF file from image files 1.6 * 1.7 * Input handler dispatch 1.8 - * $Id: tumble_input.c,v 1.3 2003/03/20 06:55:27 eric Exp $ 1.9 + * $Id: tumble_input.c,v 1.4 2003/03/25 01:38:08 eric Exp $ 1.10 * Copyright 2001, 2002, 2003 Eric Smith <eric@brouhaha.com> 1.11 * 1.12 * This program is free software; you can redistribute it and/or modify 1.13 @@ -110,9 +110,13 @@ 1.14 1.15 bool close_input_file (void) 1.16 { 1.17 - bool result; 1.18 + bool result = 1; 1.19 1.20 - result = current_input_handler->close_input_file (); 1.21 + if (current_input_handler) 1.22 + { 1.23 + result = current_input_handler->close_input_file (); 1.24 + current_input_handler = NULL; 1.25 + } 1.26 if (in_filename) 1.27 free (in_filename); 1.28 if (in) 1.29 @@ -127,6 +131,8 @@ 1.30 1.31 bool last_input_page (void) 1.32 { 1.33 + if (! current_input_handler) 1.34 + return (0); 1.35 return (current_input_handler->last_input_page ()); 1.36 } 1.37 1.38 @@ -135,6 +141,8 @@ 1.39 input_attributes_t input_attributes, 1.40 image_info_t *image_info) 1.41 { 1.42 + if (! current_input_handler) 1.43 + return (0); 1.44 return (current_input_handler->get_image_info (image, 1.45 input_attributes, 1.46 image_info)); 1.47 @@ -145,6 +153,8 @@ 1.48 image_info_t *image_info, 1.49 pdf_page_handle page) 1.50 { 1.51 + if (! current_input_handler) 1.52 + return (0); 1.53 return (current_input_handler->process_image (image, 1.54 input_attributes, 1.55 image_info,