[gnome-terminal] Make terminal_app_get_current_window() NULL-safe



commit d41382a5ad394ac15199914584cdc8e14b29a596
Author: Christian Persch <chpe gnome org>
Date:   Sun Aug 23 21:42:41 2009 +0200

    Make terminal_app_get_current_window() NULL-safe

 src/terminal-app.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/terminal-app.c b/src/terminal-app.c
index d87069d..8311baf 100644
--- a/src/terminal-app.c
+++ b/src/terminal-app.c
@@ -1877,6 +1877,9 @@ terminal_app_edit_encodings (TerminalApp     *app,
 TerminalWindow *
 terminal_app_get_current_window (TerminalApp *app)
 {
+  if (app->windows == NULL)
+    return NULL;
+
   return g_list_last (app->windows)->data;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]