[svn:parrot] r37184 - trunk/src
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Sat Mar 7 21:11:05 UTC 2009
Author: NotFound
Date: Sat Mar 7 21:11:05 2009
New Revision: 37184
URL: https://trac.parrot.org/parrot/changeset/37184
Log:
[core] avoid segfaulting when printf'ing PMC that return NULL from get_string
Modified:
trunk/src/spf_render.c
Modified: trunk/src/spf_render.c
==============================================================================
--- trunk/src/spf_render.c Sat Mar 7 20:50:30 2009 (r37183)
+++ trunk/src/spf_render.c Sat Mar 7 21:11:05 2009 (r37184)
@@ -842,9 +842,12 @@
{
STRING * const string = obj->getstring(interp,
info.type, obj);
- STRING * const ts = handle_flags(interp, &info,
- string, 0, NULL);
- targ = Parrot_str_append(interp, targ, ts);
+ /* XXX Silently ignore? */
+ if (!STRING_IS_NULL(string)) {
+ STRING * const ts = handle_flags(interp,
+ &info, string, 0, NULL);
+ targ = Parrot_str_append(interp, targ, ts);
+ }
}
break;
More information about the parrot-commits
mailing list