This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH]: Fix crash for 'info win'


Hi!

Committed this patch to avoid to crash when issuing 'info win' and there
are no window created (or not all of them created).

	Stephane

2002-09-01  Stephane Carrez  <stcarrez@nerim.fr>

	* tuiWin.c (_tuiAllWindowsInfo): Don't crash if the window
	is not displayed.
? chg.diffs
? tui.lst
Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/tui/ChangeLog,v
retrieving revision 1.86
diff -u -p -r1.86 ChangeLog
--- ChangeLog	1 Sep 2002 16:12:52 -0000	1.86
+++ ChangeLog	1 Sep 2002 17:22:01 -0000
@@ -1,5 +1,10 @@
 2002-09-01  Stephane Carrez  <stcarrez@nerim.fr>
 
+	* tuiWin.c (_tuiAllWindowsInfo): Don't crash if the window
+	is not displayed.
+
+2002-09-01  Stephane Carrez  <stcarrez@nerim.fr>
+
 	* tui-out.c (tui_out_new): Clear start_of_line.
 	* tuiSource.c (tuiVerticalSourceScroll): Use print_source_lines
 	to update the current source line.
Index: tuiWin.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tuiWin.c,v
retrieving revision 1.21
diff -u -p -r1.21 tuiWin.c
--- tuiWin.c	24 Aug 2002 16:43:08 -0000	1.21
+++ tuiWin.c	1 Sep 2002 17:22:01 -0000
@@ -928,7 +928,7 @@ _tuiAllWindowsInfo (char *arg, int fromT
   TuiWinInfoPtr winWithFocus = tuiWinWithFocus ();
 
   for (type = SRC_WIN; (type < MAX_MAJOR_WINDOWS); type++)
-    if (winList[type]->generic.isVisible)
+    if (winList[type] && winList[type]->generic.isVisible)
       {
 	if (winWithFocus == winList[type])
 	  printf_filtered ("        %s\t(%d lines)  <has focus>\n",

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]