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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user