diff options
Diffstat (limited to 'lib/ephy-node.c')
-rw-r--r-- | lib/ephy-node.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ephy-node.c b/lib/ephy-node.c index 35545d74c..e88cb13ce 100644 --- a/lib/ephy-node.c +++ b/lib/ephy-node.c @@ -322,6 +322,8 @@ ephy_node_new (EphyNodeDb *db) { long id; + g_return_val_if_fail (EPHY_IS_NODE_DB (db), NULL); + id = _ephy_node_db_new_id (db); return ephy_node_new_with_id (db, id); @@ -332,6 +334,8 @@ ephy_node_new_with_id (EphyNodeDb *db, gulong reserved_id) { EphyNode *node; + g_return_val_if_fail (EPHY_IS_NODE_DB (db), NULL); + node = g_new0 (EphyNode, 1); node->lock = g_new0 (GStaticRWLock, 1); @@ -366,6 +370,8 @@ ephy_node_new_with_id (EphyNodeDb *db, gulong reserved_id) EphyNodeDb * ephy_node_get_db (EphyNode *node) { + g_return_val_if_fail (EPHY_IS_NODE (node), NULL); + return node->db; } |