about summary refs log tree commit diff stats
path: root/src/ui/windows.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/windows.c')
-rw-r--r--src/ui/windows.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ui/windows.c b/src/ui/windows.c
index 5156684b..ff7fc3e2 100644
--- a/src/ui/windows.c
+++ b/src/ui/windows.c
@@ -81,7 +81,11 @@ wins_get_console(void)
 ProfWin *
 wins_get_current(void)
 {
-    return g_hash_table_lookup(windows, GINT_TO_POINTER(current));
+    if (windows != NULL) {
+        return g_hash_table_lookup(windows, GINT_TO_POINTER(current));
+    } else {
+        return NULL;
+    }
 }
 
 GList *