From e07d1b4137e4c29d737678cfe2cb958c82cf749c Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Sun, 19 Aug 2012 15:07:07 -0400 Subject: [PATCH] add check for NULL --- termite.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);