This commit is contained in:
nakst 2021-11-16 21:12:46 +00:00
parent 72bb57b097
commit 13aadc050f
2 changed files with 3 additions and 3 deletions

View File

@ -1004,6 +1004,7 @@ int PlacesViewCallback(EsElement *element, EsMessage *message) {
int BreadcrumbBarMessage(EsElement *element, EsMessage *message) {
Instance *instance = element->instance;
EsTextbox *textbox = (EsTextbox *) element;
if (message->type == ES_MSG_TEXTBOX_ACTIVATE_BREADCRUMB) {
String section = PathGetSection(instance->folder->path, message->activateBreadcrumb);
@ -1015,7 +1016,7 @@ int BreadcrumbBarMessage(EsElement *element, EsMessage *message) {
InstanceLoadFolder(instance, path);
} else if (message->type == ES_MSG_TEXTBOX_EDIT_END) {
String section;
section.text = EsTextboxGetContents(instance->breadcrumbBar, &section.bytes);
section.text = EsTextboxGetContents(textbox, &section.bytes);
section.allocated = section.bytes;
String path = StringAllocateAndFormat("%s%z",

View File

@ -7253,8 +7253,7 @@ void UIProcessWindowManagerMessage(EsWindow *window, EsMessage *message, Process
// Check if the window has been destroyed.
if (message->type == ES_MSG_WINDOW_DESTROYED) {
if (window->instance) {
EsAssert(window->instance->window == window);
if (window->instance && window->instance->window == window) {
window->instance->window = nullptr;
EsInstanceCloseReference(window->instance);
}