CID 1584 : NULL dereference on low memory situations (get_window_info does a malloc that may fail)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38134 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adrien Destugues
2010-08-16 09:31:38 +00:00
parent 3ea58911f9
commit e414da37a1
+2 -1
View File
@@ -307,7 +307,8 @@ Screenshot::_GetActiveWindowFrame()
for (int i = 0; i < tokenCount; i++) { for (int i = 0; i < tokenCount; i++) {
token = tokens[i]; token = tokens[i];
windowInfo = get_window_info(token); windowInfo = get_window_info(token);
if (!windowInfo->is_mini && !windowInfo->show_hide_level > 0) { if (windowInfo && !windowInfo->is_mini
&& !windowInfo->show_hide_level > 0) {
foundActiveWindow = true; foundActiveWindow = true;
break; break;
} }