Avoid crashing with null expressions in debug code
This commit is contained in:
parent
2d39321f1e
commit
662b879681
|
@ -153,7 +153,8 @@ FcOpPrint (FcOp op)
|
||||||
void
|
void
|
||||||
FcExprPrint (const FcExpr *expr)
|
FcExprPrint (const FcExpr *expr)
|
||||||
{
|
{
|
||||||
switch (expr->op) {
|
if (!expr) printf ("none");
|
||||||
|
else switch (expr->op) {
|
||||||
case FcOpInteger: printf ("%d", expr->u.ival); break;
|
case FcOpInteger: printf ("%d", expr->u.ival); break;
|
||||||
case FcOpDouble: printf ("%g", expr->u.dval); break;
|
case FcOpDouble: printf ("%g", expr->u.dval); break;
|
||||||
case FcOpString: printf ("\"%s\"", expr->u.sval); break;
|
case FcOpString: printf ("\"%s\"", expr->u.sval); break;
|
||||||
|
|
Loading…
Reference in New Issue