diff options
author | Soumith Chintala <soumith@gmail.com> | 2015-10-04 06:05:09 +0300 |
---|---|---|
committer | Soumith Chintala <soumith@gmail.com> | 2015-10-04 06:05:09 +0300 |
commit | 32546816754829565a2677de505e8332aa26f237 (patch) | |
tree | 919ec2eb5ab8205c9f4f26ea1d371dc73fdeabe9 | |
parent | 746cfa01eaf752e0cd0ff8b806933c81fcc7d014 (diff) |
hard error on unresizable storages being resizedstorageunresize
-rw-r--r-- | lib/TH/generic/THStorage.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/TH/generic/THStorage.c b/lib/TH/generic/THStorage.c index b04e98d..84298f5 100644 --- a/lib/TH/generic/THStorage.c +++ b/lib/TH/generic/THStorage.c @@ -155,6 +155,8 @@ void THStorage_(resize)(THStorage *storage, long size) storage->data, sizeof(real)*size); storage->size = size; + } else { + THError("Trying to resize storage that is not resizable"); } } |