Revision: 56270
          http://sourceforge.net/p/brlcad/code/56270
Author:   mohitdaga
Date:     2013-07-27 21:40:53 +0000 (Sat, 27 Jul 2013)
Log Message:
-----------
Corrected bug in rtedge. As per the new ICV api, icv_image_save doesnt free 
image. Thus icv_image_save and icv_image_free have to be called atomically if 
the image has to be freeed.

Modified Paths:
--------------
    brlcad/trunk/src/libged/screengrab.c
    brlcad/trunk/src/rt/do.c

Modified: brlcad/trunk/src/libged/screengrab.c
===================================================================
--- brlcad/trunk/src/libged/screengrab.c        2013-07-27 20:34:07 UTC (rev 
56269)
+++ brlcad/trunk/src/libged/screengrab.c        2013-07-27 21:40:53 UTC (rev 
56270)
@@ -111,11 +111,12 @@
        icv_image_writeline(bif, i, rows[i], ICV_DATA_UCHAR);
     }
 
-    if (bif != NULL)
+    if (bif != NULL) {
        icv_image_save(bif, argv[1], ICV_IMAGE_AUTO);
+       icv_image_free(bif);
+       bif = NULL;
+    }
 
-    icv_image_free(bif);
-
     bu_free(rows, "rows");
     bu_free(idata, "image data");
 

Modified: brlcad/trunk/src/rt/do.c
===================================================================
--- brlcad/trunk/src/rt/do.c    2013-07-27 20:34:07 UTC (rev 56269)
+++ brlcad/trunk/src/rt/do.c    2013-07-27 21:40:53 UTC (rev 56270)
@@ -919,10 +919,12 @@
               rtip->rti_nrays,
               wallclock, ((double)(rtip->rti_nrays))/wallclock);
     }
-    if (bif != NULL)
+    if (bif != NULL) {
        icv_image_save(bif, framename, ICV_IMAGE_AUTO_NO_PIX);
        icv_image_free(bif);
-    bif = NULL;
+       bif = NULL;
+    }
+
     if (outfp != NULL) {
        /* Protect finished product */
        if (outputfile != (char *)0)

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to