X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=libchimara%2Fwindow.c;h=56cbd700e6d66f2a5d9b2f496073a18fcf91eb05;hb=edc4db52f1fac6cc5f46c48786251e5a91b3406b;hp=84b6fd9431b4987b73e7832811d3b664e8418a3f;hpb=43b334356e9e0003589d506ae74a8c85e5b9349d;p=projects%2Fchimara%2Fchimara.git diff --git a/libchimara/window.c b/libchimara/window.c index 84b6fd9..56cbd70 100644 --- a/libchimara/window.c +++ b/libchimara/window.c @@ -37,7 +37,7 @@ window_new_common(glui32 rock) win->buffer = g_string_sized_new(1024); /* Initialise hyperlink table */ - win->hyperlinks = g_hash_table_new_full(g_int_hash, g_direct_equal, g_free, g_object_unref); + win->hyperlinks = g_hash_table_new_full(g_int_hash, g_int_equal, g_free, g_free); return win; } @@ -170,7 +170,11 @@ winid_t glk_window_get_parent(winid_t win) { VALID_WINDOW(win, return NULL); + /* Value will also be NULL if win is the root window */ + if(win->window_node->parent == NULL) + return NULL; + return (winid_t)win->window_node->parent->data; }