On Wed, 18 Apr 2007 16:13:11 -0400 [EMAIL PROTECTED] wrote:
>On Wed, 18 Apr 2007 15:59:57 -0400 Dennis Schridde 
><[EMAIL PROTECTED]> wrote:
>>Am Mittwoch, 18. April 2007 schrieb [EMAIL PROTECTED]:
>>> Get crash when hit f10 key.
>>Which revision are you using?
>1143 now  (just got it)  same thing.
>

This fix screenshot code.  It no crash no more here.
How this no crash on linux?

Index: screen.c
===================================================================
--- screen.c    (revision 1143)
+++ screen.c    (working copy)
@@ -380,7 +380,7 @@
        if (*info_ptr != NULL)
                png_destroy_info_struct(*png_ptr, info_ptr);
        if (*png_ptr != NULL)
-               png_destroy_read_struct(png_ptr, NULL, NULL);
+               png_destroy_write_struct(png_ptr,NULL, NULL);
        if (scanlines != NULL)
                free(scanlines);
 }
@@ -389,7 +389,9 @@
 {
        const unsigned char** scanlines = NULL;
        png_infop info_ptr = NULL;
-       png_structp png_ptr = 
png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
+       png_structp png_ptr = NULL;
+       
+       png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, 
NULL, NULL);
 
        if (png_ptr == NULL)
        {
@@ -465,7 +467,7 @@
 
                png_write_png(png_ptr, info_ptr, PNG_TRANSFORM_IDENTITY, NULL);
        }
-
+       png_write_end(png_ptr, info_ptr);
        return PNGCleanup(&info_ptr, &png_ptr, scanlines);
 }
 

--
Click to get a free auto insurance quote from top company at discount
http://tagline.hushmail.com/fc/CAaCXv1QRV4aMbH7JL2Ggz8Kk4FVgZr6/


_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to