Crash when attempting to save image as .PNG Linux FC4

Report bugs, bug fixes and workarounds here.
Topic author
wkv
Posts: 8
Joined: 19.02.2006
With us: 18 years 9 months
Location: Colorado Springs, CO USA

Crash when attempting to save image as .PNG Linux FC4

Post #1by wkv » 20.02.2006, 03:09

The program reported a segmentation violation if asked to
capture a PNG image. The problem was an incorrect destruction
call in imagecapture.cpp

Code: Select all

--- celestia-1.4.1/src/celestia/imagecapture.cpp~       2004-11-16 00:14:20.000000000 -0700
+++ celestia-1.4.1/src/celestia/imagecapture.cpp        2006-02-19 19:58:03.000000000 -0700
@@ -195,7 +195,7 @@
     png_write_end(png_ptr, info_ptr);

     // Clean up everything . . .
-    png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+    png_destroy_write_struct(&png_ptr, &info_ptr);
     delete[] row_pointers;
     delete[] pixels;
     fclose(out);


Now both the PNG and JPEG images saved are still corrupted :-( however
they look the same :)

Return to “Bugs”