Permalink
Browse files

fixed segv

  • Loading branch information...
1 parent 4aa90a1 commit 80337e698f1edffcff9f3ed2fac6cbf364c03995 @chobie committed Jan 8, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/render_base.c
  2. +1 −1 src/render_html.c
View
@@ -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
@@ -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);

0 comments on commit 80337e6

Please sign in to comment.