diff --git a/gui/create_room_dialog.c b/gui/create_room_dialog.c index 36025b9a..ca819ef9 100644 --- a/gui/create_room_dialog.c +++ b/gui/create_room_dialog.c @@ -2,7 +2,7 @@ /* * LADI Session Handler (ladish) * - * Copyright (C) 2010 Nedko Arnaudov + * Copyright (C) 2010,2012 Nedko Arnaudov * ************************************************************************** * This file contains implementation of the "create room" dialog @@ -143,6 +143,12 @@ again: goto again; } + name = (char *)gtk_entry_get_text(entry); + if (strlen(name) == 0) + { + goto again; + } + gtk_tree_model_get(GTK_TREE_MODEL(g_liststore), &iter, COL_NAME, &template, -1); template = strdup(template); if (template == NULL) @@ -152,12 +158,6 @@ again: goto exit; } - name = (char *)gtk_entry_get_text(entry); - if (strlen(name) == 0) - { - goto again; - } - name = strdup(name); if (name == NULL) {