We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 46f8d3f + 45e09b3 commit 6ade6fbCopy full SHA for 6ade6fb
1 file changed
ImGuiFileDialog.cpp
@@ -2498,9 +2498,11 @@ void IGFD::FileManager::DrawPathComposer(const FileDialogInternal& vFileDialogIn
2498
if (IMGUI_BUTTON(editPathButtonString)) {
2499
inputPathActivated = !inputPathActivated;
2500
if (inputPathActivated) {
2501
- auto endIt = m_CurrentPathDecomposition.end();
2502
- m_CurrentPath = ComposeNewPath(--endIt);
2503
- IGFD::Utils::SetBuffer(inputPathBuffer, MAX_PATH_BUFFER_SIZE, m_CurrentPath);
+ if (!m_CurrentPathDecomposition.empty()) {
+ auto endIt = m_CurrentPathDecomposition.end();
+ m_CurrentPath = ComposeNewPath(--endIt);
2504
+ IGFD::Utils::SetBuffer(inputPathBuffer, MAX_PATH_BUFFER_SIZE, m_CurrentPath);
2505
+ }
2506
}
2507
2508
if (ImGui::IsItemHovered())
0 commit comments