about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/windows.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/windows.c b/src/windows.c
index 0d87c378..97d85192 100644
--- a/src/windows.c
+++ b/src/windows.c
@@ -844,13 +844,23 @@ cons_about(void)
     wprintw(_cons_win, "Type '/help' to show complete help.\n");
     _win_show_time(_cons_win);
     wprintw(_cons_win, "\n");
-    
-    char *latest_release = release_get_latest();
-    _win_show_time(_cons_win);
-    wprintw(_cons_win, "RELEASE: %s", latest_release);
-    free(latest_release);
-    _win_show_time(_cons_win);
-    wprintw(_cons_win, "\n");
+
+    // check for new version if this is a release build
+    if (strcmp(PACKAGE_STATUS, "release") == 0) {
+        char *latest_release = release_get_latest();
+
+        if (latest_release != NULL) {
+            gboolean relase_valid = g_regex_match_simple("^\\d+\\.\\d+\\.\\d+$", latest_release, 0, 0);
+
+            if (relase_valid) {
+                _win_show_time(_cons_win);
+                wprintw(_cons_win, "RELEASE: %s", latest_release);
+                free(latest_release);
+                _win_show_time(_cons_win);
+                wprintw(_cons_win, "\n");
+            }
+        }
+    }
 
     prefresh(_cons_win, 0, 0, 1, 0, rows-3, cols-1);