]> granicus.if.org Git - php/commitdiff
Need to check if we got any value before destroying it
authorMarcus Boerger <helly@php.net>
Thu, 28 Aug 2003 23:36:46 +0000 (23:36 +0000)
committerMarcus Boerger <helly@php.net>
Thu, 28 Aug 2003 23:36:46 +0000 (23:36 +0000)
ext/sqlite/sqlite.c

index 2b0deacb8b5d9488b64dc109cf6cc4103d4d2700..379138d8f504dee2a600784ef3edd136e317526b 100644 (file)
@@ -1735,7 +1735,9 @@ PHP_FUNCTION(sqlite_fetch_object)
                if (zend_call_function(&fci, &fcc TSRMLS_CC) == FAILURE) {
                        zend_throw_exception_ex(sqlite_ce_exception, 0 TSRMLS_CC, "Could not execute %s::%s()", class_name, ce->constructor->common.function_name);
                } else {
-                       zval_ptr_dtor(&retval_ptr);
+                       if (retval_ptr) {
+                               zval_ptr_dtor(&retval_ptr);
+                       }
                }
        }
 }