aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svte.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/svte.c b/svte.c
index 10bb28a..45c4b67 100644
--- a/svte.c
+++ b/svte.c
@@ -177,12 +177,13 @@ gboolean event_button(GtkWidget *widget, GdkEventButton *button_event, struct te
if(button_event->button == 1) {
match = vte_terminal_match_check(VTE_TERMINAL(t->vte),
- button_event->x / vte_terminal_get_char_width (VTE_TERMINAL (t->vte)),
- button_event->y / vte_terminal_get_char_height (VTE_TERMINAL (t->vte)),
- &ret);
- launch_url(match);
- return TRUE;
-
+ button_event->x / vte_terminal_get_char_width (VTE_TERMINAL (t->vte)),
+ button_event->y / vte_terminal_get_char_height (VTE_TERMINAL (t->vte)),
+ &ret);
+ if (match) {
+ launch_url(match);
+ return TRUE;
+ }
}
return FALSE;
}