Another bunch of fixes for object type.
All checks were successful
The build was successful.

This commit is contained in:
2018-09-24 13:34:22 +02:00
parent 550107235c
commit 2db1954779
2 changed files with 18 additions and 12 deletions

View File

@@ -717,10 +717,12 @@ static void PH7_ClassInstanceRelease(ph7_class_instance *pThis) {
* If the reference count reaches zero,release the whole instance.
*/
PH7_PRIVATE void PH7_ClassInstanceUnref(ph7_class_instance *pThis) {
pThis->iRef--;
if(pThis->iRef < 1) {
/* No more reference to this instance */
PH7_ClassInstanceRelease(&(*pThis));
if(pThis) {
pThis->iRef--;
if(pThis->iRef < 1) {
/* No more reference to this instance */
PH7_ClassInstanceRelease(&(*pThis));
}
}
}
/*