diff -r 3893b99cd443 -r e47e4be549ad plugins/gallery/sidebar.php --- a/plugins/gallery/sidebar.php Sat Nov 03 14:15:52 2007 -0400 +++ b/plugins/gallery/sidebar.php Sat Nov 24 11:41:40 2007 -0500 @@ -38,7 +38,7 @@ $rand = array_rand($images); $image = $images[$rand]; $acl = $session->fetch_page_acl(strval($rand), 'Gallery'); - if ( $acl->get_permissions('read') ) + if ( is_object($acl) && $acl->get_permissions('read') ) { $my_image = $image; break;