intel accelerant: NULL dereferences (overlays)

Rather than checking if "window" AND "view" are NULL, check if
"window" OR "view" are NULL, since neither could be null and deferenced later
on.

From the Matrox accelerant, it seems that such event occurs when a
"Workspace switch, screen prefs change, or overlay app shutdown occurs"

Might be interesting to revisit tickets related to intel accelerant.

CID 205.
This commit is contained in:
Philippe Saint-Pierre
2012-01-04 20:48:15 -05:00
parent 97f16764c7
commit f91a2037a5
@@ -543,7 +543,7 @@ intel_configure_overlay(overlay_token overlayToken,
if (overlayToken != (overlay_token)gInfo->shared_info->overlay_token)
return B_BAD_VALUE;
if (window == NULL && view == NULL) {
if (window == NULL || view == NULL) {
hide_overlay();
return B_OK;
}