Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed segv

  • Loading branch information...
commit 80337e698f1edffcff9f3ed2fac6cbf364c03995 1 parent 4aa90a1
@chobie authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  src/render_base.c
  2. +1 −1  src/render_html.c
View
2  src/render_base.c
@@ -612,7 +612,7 @@ PHP_METHOD(sundown_render_base, __construct)
return;
}
- if (Z_TYPE_P(render_flags) == IS_ARRAY) {
+ if (render_flags != NULL && Z_TYPE_P(render_flags) == IS_ARRAY) {
ALLOC_INIT_ZVAL(c_flags);
ZVAL_ZVAL(c_flags, render_flags, 1, 1);
add_property_zval_ex(getThis(),"render_flags",sizeof("render_flags"),c_flags TSRMLS_CC);
View
2  src/render_html.c
@@ -822,7 +822,7 @@ PHP_METHOD(sundown_render_html, __construct)
return;
}
- if (Z_TYPE_P(render_flags) == IS_ARRAY) {
+ if (render_flags != NULL && Z_TYPE_P(render_flags) == IS_ARRAY) {
ALLOC_INIT_ZVAL(c_flags);
ZVAL_ZVAL(c_flags, render_flags, 1, 1);
add_property_zval_ex(getThis(),"render_flags",sizeof("render_flags"),c_flags TSRMLS_CC);
Please sign in to comment.
Something went wrong with that request. Please try again.