aboutsummaryrefslogtreecommitdiff
path: root/src/scriptapi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/scriptapi.cpp')
-rw-r--r--src/scriptapi.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/scriptapi.cpp b/src/scriptapi.cpp
index f1035516a..8a4e0b0d9 100644
--- a/src/scriptapi.cpp
+++ b/src/scriptapi.cpp
@@ -1496,7 +1496,7 @@ private:
{
ItemStack *o = checkobject(L, 1);
push_stack_item(L, o->m_stack);
- if(o->m_stack->getCount() == 1){
+ if(o->m_stack->getCount() <= 1){
delete o->m_stack;
o->m_stack = NULL;
} else {