diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-08-19 16:11:05 -0400 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-08-19 16:11:05 -0400 |
commit | 844b53ce29619c5bc55e7e4f97c6abbdc060ef8e (patch) | |
tree | 9ab179b802360cc7942a472190959bc22e1eadf6 /pts-core/functions/pts-functions_system_graphics.php | |
parent | ddb47916fa5cf6765d40a390188ba8d8d06fd1ef (diff) | |
download | phoronix-test-suite-upstream-844b53ce29619c5bc55e7e4f97c6abbdc060ef8e.tar.gz phoronix-test-suite-upstream-844b53ce29619c5bc55e7e4f97c6abbdc060ef8e.tar.xz phoronix-test-suite-upstream-844b53ce29619c5bc55e7e4f97c6abbdc060ef8e.zip |
pts-core: Fixes for sort_available_modes() used by
xrandr_available_modes()
Diffstat (limited to 'pts-core/functions/pts-functions_system_graphics.php')
-rw-r--r-- | pts-core/functions/pts-functions_system_graphics.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pts-core/functions/pts-functions_system_graphics.php b/pts-core/functions/pts-functions_system_graphics.php index 577df04..1024c77 100644 --- a/pts-core/functions/pts-functions_system_graphics.php +++ b/pts-core/functions/pts-functions_system_graphics.php @@ -338,10 +338,10 @@ function sort_available_modes($modes) $hit = false; for($j = 0; $j < count($modes) && !$hit; $j++) { - if(($modes[$j][0] * $modes[$j][1]) == $mode_pixel_counts[$i]) + if($modes[$j] != null && ($modes[$j][0] * $modes[$j][1]) == $mode_pixel_counts[$i]) { array_push($sorted_modes, $modes[$j]); - unset($modes[$j]); + $modes[$j] = null; $hit = true; } } |