summaryrefslogtreecommitdiff
path: root/src/analysis/block.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/block.c')
-rw-r--r--src/analysis/block.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/analysis/block.c b/src/analysis/block.c
index 14b2c0e..8c80177 100644
--- a/src/analysis/block.c
+++ b/src/analysis/block.c
@@ -174,8 +174,7 @@ static void g_code_block_dispose(GCodeBlock *block)
g_code_block_unlock_dest(block);
#endif
- if (block->view != NULL)
- g_object_unref(G_OBJECT(block->view));
+ g_clear_object(&block->view);
G_OBJECT_CLASS(g_code_block_parent_class)->dispose(G_OBJECT(block));
@@ -759,7 +758,7 @@ static void g_block_list_dispose(GBlockList *list)
if (list->blocks[i] != NULL)
{
g_code_block_delete_all_links(list->blocks[i]);
- g_object_unref(G_OBJECT(list->blocks[i]));
+ g_clear_object(&list->blocks[i]);
}
G_OBJECT_CLASS(g_block_list_parent_class)->dispose(G_OBJECT(list));