aboutsummaryrefslogtreecommitdiff
path: root/src/library_sdl.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/library_sdl.js')
-rw-r--r--src/library_sdl.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library_sdl.js b/src/library_sdl.js
index ee62139c..34484a0e 100644
--- a/src/library_sdl.js
+++ b/src/library_sdl.js
@@ -365,7 +365,7 @@ var LibrarySDL = {
freeSurface: function(surf) {
var refcountPointer = surf + Runtime.QUANTUM_SIZE * 14;
var refcount = {{{ makeGetValue('refcountPointer', '0', 'i32') }}};
- if (refcount > 0) {
+ if (refcount > 1) {
{{{ makeSetValue('refcountPointer', '0', 'refcount - 1', 'i32') }}};
return;
}