npy_format_descriptor::format() - fail if unbound
diff --git a/include/pybind11/numpy.h b/include/pybind11/numpy.h
index f940852..73cdce0 100644
--- a/include/pybind11/numpy.h
+++ b/include/pybind11/numpy.h
@@ -234,6 +234,8 @@
     }
 
     static const char* format() {
+        if (!dtype_())
+            pybind11_fail("NumPy: unsupported buffer format!");
         return format_();
     }