[ros-diffs] [cwittich] 32563: only destroy objects which are valid

cwittich at svn.reactos.org cwittich at svn.reactos.org
Sun Mar 9 12:33:23 CET 2008


Author: cwittich
Date: Tue Mar  4 21:41:59 2008
New Revision: 32563

URL: http://svn.reactos.org/svn/reactos?rev=3D32563&view=3Drev
Log:
only destroy objects which are valid

Modified:
    trunk/reactos/base/applications/msconfig/msconfig.c

Modified: trunk/reactos/base/applications/msconfig/msconfig.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msc=
onfig/msconfig.c?rev=3D32563&r1=3D32562&r2=3D32563&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/reactos/base/applications/msconfig/msconfig.c (original)
+++ trunk/reactos/base/applications/msconfig/msconfig.c Tue Mar  4 21:41:59=
 2008
@@ -184,13 +184,20 @@
             break;
 =

         case WM_DESTROY:
-            DestroyWindow(hToolsPage);
-            DestroyWindow(hGeneralPage);
-            DestroyWindow(hServicesPage);
-            DestroyWindow(hStartupPage);
-            DestroyWindow(hFreeLdrPage);
-            DestroyWindow(hSystemPage);
-			DestroyIcon(hIcon);
+            if (hToolsPage)
+                DestroyWindow(hToolsPage);
+            if (hGeneralPage)
+                DestroyWindow(hGeneralPage);
+            if (hServicesPage)
+                DestroyWindow(hServicesPage);
+            if (hStartupPage)
+                DestroyWindow(hStartupPage);
+            if (hFreeLdrPage)
+                DestroyWindow(hFreeLdrPage);
+            if (hSystemPage)
+                DestroyWindow(hSystemPage);
+            if (hIcon)
+                DestroyIcon(hIcon);
             return DefWindowProc(hDlg, message, wParam, lParam);
     }
 =





More information about the Ros-diffs mailing list