Skip to content

Commit 1b0e9d8

Browse files
committed
add sanity check
1 parent 8c7257e commit 1b0e9d8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/sfc-sfg.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ List sfc_unique_sfg_dims_and_types(List sfc) {
4949
class_dim.insert("XYZM");
5050
}
5151

52+
if (!Rf_inherits(item, "sfg"))
53+
stop("object(s) should be of class 'sfg'");
54+
5255
if (Rf_inherits(item, "POINT")) {
5356
class_type.insert("POINT");
5457
continue;

0 commit comments

Comments
 (0)