From ad4bf983da86e0bd4f1d33cec64dfcce1f2459d4 Mon Sep 17 00:00:00 2001 From: Maarten Bosma Date: Mon, 18 Dec 2006 15:02:55 +0000 Subject: [PATCH] prevent crash svn path=/trunk/; revision=25190 --- reactos/base/applications/downloader/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/reactos/base/applications/downloader/main.c b/reactos/base/applications/downloader/main.c index 7f68b3685cc..d96c533c542 100644 --- a/reactos/base/applications/downloader/main.c +++ b/reactos/base/applications/downloader/main.c @@ -264,7 +264,8 @@ LRESULT CALLBACK WndProc (HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) else if(data->hwndFrom == hApps) { SelectedApplication = (struct Application*) ((LPNMTREEVIEW)lParam)->itemNew.lParam; - ShowMessage(SelectedApplication->Name, SelectedApplication->Description); + if(SelectedApplication) + ShowMessage(SelectedApplication->Name, SelectedApplication->Description); } } } @@ -328,7 +329,7 @@ INT WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInst, hwnd = CreateWindowW(L"Downloader", Strings[IDS_WINDOW_TITLE], - WS_OVERLAPPEDWINDOW, + WS_OVERLAPPEDWINDOW|WS_CLIPCHILDREN, CW_USEDEFAULT, CW_USEDEFAULT, 600, 550,