--- potx.inc.orig	2007-12-31 14:12:17.000000000 +0100
+++ potx.inc	2007-12-31 14:12:41.000000000 +0100
@@ -365,8 +365,8 @@
     if (count($strings)) {
       // Source string array was done, so export translations.
       foreach ($strings as $index => $string) {
-        if ($translation = db_query("SELECT t.translation FROM {locales_source} s LEFT JOIN {locales_target} t ON t.lid = s.lid WHERE s.source = '%s' AND t.{$language_column} = '%s'", $string, $translation_export_langcode)) {
-          $output .= 'msgstr['. $index .'] '. _locale_export_print(_locale_export_remove_plural($translation->translation));
+        if ($translation = db_result(db_query("SELECT t.translation FROM {locales_source} s LEFT JOIN {locales_target} t ON t.lid = s.lid WHERE s.source = '%s' AND t.{$language_column} = '%s'", $string, $translation_export_langcode))) {
+          $output .= 'msgstr['. $index .'] '. _locale_export_print(_locale_export_remove_plural($translation));
         }
         else {
           $output .= "msgstr[". $index ." \"\"\n";
