CID 1039: Dereference mode only after checking it for NULL.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27489 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -529,11 +529,11 @@ intel_set_display_mode(display_mode *mode)
|
|||||||
{
|
{
|
||||||
TRACE(("intel_set_display_mode()\n"));
|
TRACE(("intel_set_display_mode()\n"));
|
||||||
|
|
||||||
display_mode target = *mode;
|
|
||||||
|
|
||||||
if (mode == NULL || intel_propose_display_mode(&target, mode, mode))
|
if (mode == NULL || intel_propose_display_mode(&target, mode, mode))
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
|
display_mode target = *mode;
|
||||||
|
|
||||||
uint32 colorMode, bytesPerRow, bitsPerPixel;
|
uint32 colorMode, bytesPerRow, bitsPerPixel;
|
||||||
get_color_space_format(target, colorMode, bytesPerRow, bitsPerPixel);
|
get_color_space_format(target, colorMode, bytesPerRow, bitsPerPixel);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user