forked from enlightenment/edi
Fix crash when creating a new file
This commit is contained in:
parent
e6ddefedd5
commit
203f2619e1
|
@ -58,6 +58,9 @@ Edi_Content_Provider *edi_content_provider_for_mime_get(const char *mime)
|
||||||
{
|
{
|
||||||
char *id;
|
char *id;
|
||||||
|
|
||||||
|
if (!mime)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
if (!strcasecmp(mime, "text/plain") || !strcasecmp(mime, "application/x-shellscript"))
|
if (!strcasecmp(mime, "text/plain") || !strcasecmp(mime, "application/x-shellscript"))
|
||||||
id = "text";
|
id = "text";
|
||||||
else if (!strcasecmp(mime, "text/x-chdr") || !strcasecmp(mime, "text/x-csrc")
|
else if (!strcasecmp(mime, "text/x-chdr") || !strcasecmp(mime, "text/x-csrc")
|
||||||
|
|
|
@ -447,7 +447,7 @@ _tb_new_create_cb(void *data,
|
||||||
path = edi_project_file_path_get(name);
|
path = edi_project_file_path_get(name);
|
||||||
|
|
||||||
fclose(fopen(path, "w"));
|
fclose(fopen(path, "w"));
|
||||||
edi_mainview_open_path(path);
|
edi_mainview_open_path(eina_stringshare_add(path));
|
||||||
|
|
||||||
evas_object_del(_edi_new_popup);
|
evas_object_del(_edi_new_popup);
|
||||||
free((char*)path);
|
free((char*)path);
|
||||||
|
|
Loading…
Reference in New Issue