add check for NULL

This commit is contained in:
Daniel Micay 2012-08-19 15:07:07 -04:00
parent fbfe4dae40
commit e07d1b4137
1 changed files with 1 additions and 1 deletions

View File

@ -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);