mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 05:27:41 -05:00
fix: Crash when not making a valid selection in provider load interfaces
This commit is contained in:
@@ -29,11 +29,12 @@ namespace hex::plugin::builtin {
|
||||
|
||||
auto provider = hex::ImHexApi::Provider::get();
|
||||
if (provider != nullptr) {
|
||||
provider->drawLoadInterface();
|
||||
bool settingsValid = provider->drawLoadInterface();
|
||||
|
||||
ImGui::NewLine();
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::BeginDisabled(!settingsValid);
|
||||
if (ImGui::Button("hex.builtin.common.open"_lang)) {
|
||||
if (provider->open()) {
|
||||
EventManager::post<EventProviderOpened>(provider);
|
||||
@@ -44,6 +45,7 @@ namespace hex::plugin::builtin {
|
||||
TaskManager::doLater([=] { ImHexApi::Provider::remove(provider); });
|
||||
}
|
||||
}
|
||||
ImGui::EndDisabled();
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user