[svn:parrot] r43944 - trunk/src/pmc

whiteknight at svn.parrot.org whiteknight at svn.parrot.org
Sat Feb 13 22:59:22 UTC 2010


Author: whiteknight
Date: Sat Feb 13 22:59:21 2010
New Revision: 43944
URL: https://trac.parrot.org/parrot/changeset/43944

Log:
fix ImageIO.mark() to not try to mark a NULL buffer. Patch inspired by chromatic++, mikehh++

Modified:
   trunk/src/pmc/imageio.pmc

Modified: trunk/src/pmc/imageio.pmc
==============================================================================
--- trunk/src/pmc/imageio.pmc	Sat Feb 13 21:27:51 2010	(r43943)
+++ trunk/src/pmc/imageio.pmc	Sat Feb 13 22:59:21 2010	(r43944)
@@ -324,7 +324,9 @@
 
 */
     VTABLE void mark() {
-        Parrot_gc_mark_PObj_alive(INTERP, (PObj *)(PARROT_IMAGEIO(SELF)->buffer));
+        PObj * buffer = (PObj *)(PARROT_IMAGEIO(SELF)->buffer);
+        if (buffer)
+            Parrot_gc_mark_PObj_alive(INTERP, (PObj *)(PARROT_IMAGEIO(SELF)->buffer));
         Parrot_gc_mark_PMC_alive(INTERP, PARROT_IMAGEIO(SELF)->todo);
         Parrot_gc_mark_PMC_alive(INTERP, PARROT_IMAGEIO(SELF)->seen);
         Parrot_gc_mark_PMC_alive(INTERP, PARROT_IMAGEIO(SELF)->id_list);


More information about the parrot-commits mailing list