X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=libchimara%2Fwindow.c;h=56cbd700e6d66f2a5d9b2f496073a18fcf91eb05;hb=6d86f63cea38cf554181e810230e15aefa90a604;hp=84b6fd9431b4987b73e7832811d3b664e8418a3f;hpb=c6e78c57fc1b323ec055bfe48c7430515be27d1c;p=rodin%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; }