File: _imaging.c
Function: _transform2
Error: returning (PyObject*)NULL without setting an exception
1614 static PyObject* 
1615 _transform2(ImagingObject* self, PyObject* args)
1616 {
1617     static const char* wrong_number = "wrong number of matrix entries";
1618 
1619     Imaging imIn;
1620     Imaging imOut;
1621     int n;
1622     double *a;
1623 
1624     ImagingObject* imagep;
1625     int x0, y0, x1, y1;
1626     int method;
1627     PyObject* data;
1628     int filter = IMAGING_TRANSFORM_NEAREST;
1629     int fill = 1;
1630     if (!PyArg_ParseTuple(args, "(iiii)O!iO|ii",
when PyArg_ParseTuple() succeeds
taking False path
1631                           &x0, &y0, &x1, &y1,
1632 			  &Imaging_Type, &imagep,
1633                           &method, &data,
1634                           &filter, &fill))
1635 	return NULL;
1636 
1637     switch (method) {
when following case 2
1638     case IMAGING_TRANSFORM_AFFINE:
1639         n = 6;
1640         break;
1641     case IMAGING_TRANSFORM_PERSPECTIVE:
1642         n = 8;
1643         break;
1644     case IMAGING_TRANSFORM_QUAD:
1645         n = 8;
1646         break;
1647     default:
1648         n = -1; /* force error */
1649     }
1650 
1651     a = getlist(data, &n, wrong_number, TYPE_DOUBLE);
1652     if (!a)
when treating unknown void * from _imaging.c:1651 as non-NULL
taking False path
1653         return NULL;
1654 
1655     imOut = self->image;
1656     imIn = imagep->image;
1657 
1658     /* FIXME: move transform dispatcher into libImaging */
1659 
1660     switch (method) {
when following default
1661     case IMAGING_TRANSFORM_AFFINE:
1662         imOut = ImagingTransformAffine(
1663             imOut, imIn, x0, y0, x1, y1, a, filter, 1
1664             );
1665         break;
1666     case IMAGING_TRANSFORM_PERSPECTIVE:
1667         imOut = ImagingTransformPerspective(
1668             imOut, imIn, x0, y0, x1, y1, a, filter, 1
1669             );
1670         break;
1671     case IMAGING_TRANSFORM_QUAD:
1672         imOut = ImagingTransformQuad(
1673             imOut, imIn, x0, y0, x1, y1, a, filter, 1
1674             );
1675         break;
1676     default:
1677         (void) ImagingError_ValueError("bad transform method");
1678     }
1679 
1680     free(a);
1681 
1682     if (!imOut)
when treating unknown struct ImagingMemoryInstance * from _imaging.c:1655 as NULL
taking True path
1683         return NULL;
1684 
1685     Py_INCREF(Py_None);
1686     return Py_None;
1687 }
returning (PyObject*)NULL without setting an exception
found 11 similar trace(s) to this