Author: cwittich
Date: Thu May 28 19:31:12 2009
New Revision: 41182
URL:
http://svn.reactos.org/svn/reactos?rev=41182&view=rev
Log:
try to fix crash on exit
Modified:
trunk/tools/reactosdbg/RosDBG/MainWindow.cs
Modified: trunk/tools/reactosdbg/RosDBG/MainWindow.cs
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/MainWindow…
==============================================================================
--- trunk/tools/reactosdbg/RosDBG/MainWindow.cs [iso-8859-1] (original)
+++ trunk/tools/reactosdbg/RosDBG/MainWindow.cs [iso-8859-1] Thu May 28 19:31:12 2009
@@ -347,13 +347,16 @@
private void dockPanel_ActiveDocumentChanged(object sender, EventArgs e)
{
- ToolWindow Wnd = (ToolWindow)dockPanel.ActiveDocument.DockHandler.Form;
-
- saveToolStripButton.Enabled = Wnd.IsCmdEnabled(ToolWindow.Commands.Save);
- saveToolStripMenuItem.Enabled = Wnd.IsCmdEnabled(ToolWindow.Commands.Save);
- saveAsToolStripMenuItem.Enabled =
Wnd.IsCmdEnabled(ToolWindow.Commands.SaveAs);
- printToolStripButton.Enabled = Wnd.IsCmdEnabled(ToolWindow.Commands.Print);
- printToolStripMenuItem.Enabled =
Wnd.IsCmdEnabled(ToolWindow.Commands.Print);
+ if ((dockPanel != null) && (dockPanel.ActiveDocument != null))
+ {
+ ToolWindow Wnd = (ToolWindow)dockPanel.ActiveDocument.DockHandler.Form;
+
+ saveToolStripButton.Enabled =
Wnd.IsCmdEnabled(ToolWindow.Commands.Save);
+ saveToolStripMenuItem.Enabled =
Wnd.IsCmdEnabled(ToolWindow.Commands.Save);
+ saveAsToolStripMenuItem.Enabled =
Wnd.IsCmdEnabled(ToolWindow.Commands.SaveAs);
+ printToolStripButton.Enabled =
Wnd.IsCmdEnabled(ToolWindow.Commands.Print);
+ printToolStripMenuItem.Enabled =
Wnd.IsCmdEnabled(ToolWindow.Commands.Print);
+ }
}
}