prevent crash

svn path=/trunk/; revision=25190
This commit is contained in:
Maarten Bosma 2006-12-18 15:02:55 +00:00
parent 3b3aadac55
commit ad4bf983da

View file

@ -264,7 +264,8 @@ LRESULT CALLBACK WndProc (HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
else if(data->hwndFrom == hApps) else if(data->hwndFrom == hApps)
{ {
SelectedApplication = (struct Application*) ((LPNMTREEVIEW)lParam)->itemNew.lParam; 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", hwnd = CreateWindowW(L"Downloader",
Strings[IDS_WINDOW_TITLE], Strings[IDS_WINDOW_TITLE],
WS_OVERLAPPEDWINDOW, WS_OVERLAPPEDWINDOW|WS_CLIPCHILDREN,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
600, 550, 600, 550,