Commits

Maciej Fijalkowski committed 8d5a756 Merge

merge default

Comments (0)

Files changed (1)

c/_cffi_backend.c

         char *ptrdata;
         CTypeDescrObject *ctinit;
 
+        if (!CData_Check(init)) {
+            expected = "cdata pointer";
+            goto cannot_convert;
+        }
         expected = "compatible pointer";
-        if (!CData_Check(init))
-            goto cannot_convert;
         ctinit = ((CDataObject *)init)->c_type;
         if (!(ctinit->ct_flags & (CT_POINTER|CT_FUNCTIONPTR))) {
             if (ctinit->ct_flags & CT_ARRAY)