Fix crash when creating a new file

This commit is contained in:
Andy Williams 2015-01-27 22:31:12 +00:00
parent e6ddefedd5
commit 203f2619e1
2 changed files with 4 additions and 1 deletions

View File

@ -58,6 +58,9 @@ Edi_Content_Provider *edi_content_provider_for_mime_get(const char *mime)
{
char *id;
if (!mime)
return NULL;
if (!strcasecmp(mime, "text/plain") || !strcasecmp(mime, "application/x-shellscript"))
id = "text";
else if (!strcasecmp(mime, "text/x-chdr") || !strcasecmp(mime, "text/x-csrc")

View File

@ -447,7 +447,7 @@ _tb_new_create_cb(void *data,
path = edi_project_file_path_get(name);
fclose(fopen(path, "w"));
edi_mainview_open_path(path);
edi_mainview_open_path(eina_stringshare_add(path));
evas_object_del(_edi_new_popup);
free((char*)path);