845 free(path.ptr); |
845 free(path.ptr); |
846 } |
846 } |
847 |
847 |
848 int ui_pathtextfield_update(UiPathTextField* pathtf, const char *full_path) { |
848 int ui_pathtextfield_update(UiPathTextField* pathtf, const char *full_path) { |
849 size_t full_path_len = strlen(full_path); |
849 size_t full_path_len = strlen(full_path); |
|
850 if(full_path_len == 0) { |
|
851 return 1; |
|
852 } |
850 |
853 |
851 size_t nelm = 0; |
854 size_t nelm = 0; |
852 UiPathElm* path_elm = pathtf->getpathelm(full_path, full_path_len, &nelm, pathtf->getpathelmdata); |
855 UiPathElm* path_elm = pathtf->getpathelm(full_path, full_path_len, &nelm, pathtf->getpathelmdata); |
853 if (!path_elm) { |
856 if (!path_elm) { |
854 return 1; |
857 return 1; |