File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -665,7 +665,7 @@ void phpdbg_watch_parent_ht(phpdbg_watch_element *element) {
665
665
}
666
666
667
667
void phpdbg_unwatch_parent_ht (phpdbg_watch_element * element ) {
668
- if (element -> watch -> type == WATCH_ON_BUCKET ) {
668
+ if (element -> watch && element -> watch -> type == WATCH_ON_BUCKET ) {
669
669
phpdbg_btree_result * res = phpdbg_btree_find (& PHPDBG_G (watch_HashTables ), (zend_ulong ) element -> parent_container );
670
670
ZEND_ASSERT (element -> parent_container );
671
671
if (res ) {
@@ -966,11 +966,14 @@ void phpdbg_remove_watchpoint(phpdbg_watchpoint_t *watch) {
966
966
}
967
967
968
968
void phpdbg_clean_watch_element (phpdbg_watch_element * element ) {
969
- HashTable * elements = & element -> watch -> elements ;
970
969
phpdbg_unwatch_parent_ht (element );
971
- zend_hash_del (elements , element -> str );
972
- if (zend_hash_num_elements (elements ) == 0 ) {
973
- phpdbg_remove_watchpoint (element -> watch );
970
+
971
+ if (element -> watch ) {
972
+ HashTable * elements = & element -> watch -> elements ;
973
+ zend_hash_del (elements , element -> str );
974
+ if (zend_hash_num_elements (elements ) == 0 ) {
975
+ phpdbg_remove_watchpoint (element -> watch );
976
+ }
974
977
}
975
978
}
976
979
You can’t perform that action at this time.
0 commit comments