diff --git a/src/vte.cc b/src/vte.cc
index eac5e7ab..17ae3bd6 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -5618,6 +5618,7 @@ void
 VteTerminalPrivate::hyperlink_hilite_update(vte::view::coords const& pos)
 {
         const VteRowData *rowdata;
+        glong col = -1, row = -1;
         hyperlink_idx_t new_hyperlink_hover_idx = 0;
         GdkRectangle bbox;
         const char *separator;
@@ -5625,16 +5626,18 @@ VteTerminalPrivate::hyperlink_hilite_update(vte::view::coords const& pos)
         if (!m_allow_hyperlink)
                 return;
 
-        glong col = pos.x / m_char_width;
-        glong row = pixel_to_row(pos.y);
-
         _vte_debug_print (VTE_DEBUG_HYPERLINK,
                          "hyperlink_hilite_update\n");
 
-        rowdata = find_row_data(row);
-        if (rowdata && col < rowdata->len) {
-                new_hyperlink_hover_idx = rowdata->cells[col].attr.hyperlink_idx;
+        if (view_coords_visible(pos)) {
+                col = pos.x / m_char_width;
+                row = pixel_to_row(pos.y);
+                rowdata = find_row_data(row);
+                if (rowdata && col < rowdata->len) {
+                        new_hyperlink_hover_idx = rowdata->cells[col].attr.hyperlink_idx;
+                }
         }
+
         if (new_hyperlink_hover_idx == m_hyperlink_hover_idx) {
                 _vte_debug_print (VTE_DEBUG_HYPERLINK,
                                   "hyperlink did not change\n");
