GtkNotebook: Be a bit more safe against cur_page being NULL

https://bugzilla.gnome.org/show_bug.cgi?id=477454