--- a/plugins/translation-memory/gtr-translation-memory-dialog.c	2012-03-21 17:51:44.958531866 +0100
+++ b/plugins/translation-memory/gtr-translation-memory-dialog.c	2012-03-23 19:57:20.500981162 +0100
@@ -208,6 +208,7 @@
   GFile *dir;
   gchar *dir_name;
   IdleData *data;
+  gchar *path;
 
   data = g_new0 (IdleData, 1);
   data->list = NULL;
@@ -218,6 +219,28 @@
   dir = g_file_new_for_path (dir_name);
   g_free (dir_name);
 
+  path = gtk_entry_get_text (GTK_ENTRY (dlg->priv->directory_entry));
+
+  /*
+   * If path is empty, show a warning message
+   */
+  if (*path == '\0')
+    {
+      GtkWidget *dialog;
+      dialog = gtk_message_dialog_new (data->parent,
+                                       GTK_DIALOG_DESTROY_WITH_PARENT,
+                                       GTK_MESSAGE_WARNING,
+                                       GTK_BUTTONS_CLOSE,
+                                       _("Please specify a valid path to build the translation memory"));
+
+      gtk_widget_show (dialog);
+      g_signal_connect (dialog, "response",
+                        G_CALLBACK (gtk_widget_destroy), NULL);
+    }
+    else
+    {
+
   if (g_settings_get_boolean (dlg->priv->tm_settings,
                               "restrict-to-filename"))
     {
@@ -241,6 +264,8 @@
   data, (GDestroyNotify) destroy_idle_data);
 
   g_object_unref (dir);
+
+    }
 }
 
 static void
