diff --git a/termite.cc b/termite.cc index 066da82..9aa6d63 100644 --- a/termite.cc +++ b/termite.cc @@ -193,7 +193,7 @@ static void open_selection(VteTerminal *vte) { if (browser_cmd[0]) { AtkText *text = ATK_TEXT(vte_terminal_accessible_new(vte)); char *selection = atk_text_get_selection(text, 0, NULL, NULL); - if (selection[0]) { + if (selection && selection[0]) { launch_browser(selection); } g_free(selection);