? switchtheme-417120.patch
Index: switchtheme.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/switchtheme/switchtheme.module,v
retrieving revision 1.10.2.5
diff -u -p -r1.10.2.5 switchtheme.module
--- switchtheme.module	2 Nov 2008 13:32:56 -0000	1.10.2.5
+++ switchtheme.module	15 Apr 2009 15:40:21 -0000
@@ -135,7 +135,7 @@ function switchtheme_display_random_bloc
   shuffle($themes);
   foreach ($themes as $key => $theme) {
     $theme->screenshot = dirname($theme->filename) .'/screenshot.png';
-    if (file_exists($theme->screenshot)) {
+    if ($theme->status && file_exists($theme->screenshot)) {
       // Return the first theme with a screenshot.
       $output = l("<img src=\"". base_path() ."$theme->screenshot\" alt=\"preview of $theme->name\"/>", $_GET['q'], array('query' => 'theme='. $theme->name, 'html' => TRUE));
       return $output;
