Credit Andrew - rest of fix for Arch (and termux) which includes thirdparty/Makefile
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / filepng.C
index 4b7f74f80b915563cd0c36a71fb28becd108bef9..e79c45d547bc307bdd42c391380610ba83696994 100644 (file)
@@ -2,6 +2,7 @@
 /*
  * CINELERRA
  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
+ * Copyright (C) 2003-2016 Cinelerra CV contributors
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -258,6 +259,7 @@ int FilePNG::read_frame(VFrame *output, VFrame *input)
 
        //printf("FilePNG::read_frame 1 %d %d\n", native_cmodel, output->get_color_model());
        png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0);
+       if(!png_ptr) return 0;
        info_ptr = png_create_info_struct(png_ptr);
        png_set_read_fn(png_ptr, input, (png_rw_ptr)read_function);
        png_read_info(png_ptr, info_ptr);