mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
fix: Crash when dragging the mouse onto the hex view
This commit is contained in:
@@ -1160,12 +1160,12 @@ namespace hex::plugin::builtin {
|
||||
auto &selectionStart = ProviderExtraData::getCurrent().editor.selectionStart;
|
||||
|
||||
if (ImGui::IsMouseDragging(ImGuiMouseButton_Left)) {
|
||||
this->setSelection(*selectionStart, endAddress);
|
||||
this->setSelection(selectionStart.value_or(address), endAddress);
|
||||
this->scrollToSelection();
|
||||
}
|
||||
else if (ImGui::IsMouseDown(ImGuiMouseButton_Left)) {
|
||||
if (ImGui::GetIO().KeyShift)
|
||||
this->setSelection(*selectionStart, endAddress);
|
||||
this->setSelection(selectionStart.value_or(address), endAddress);
|
||||
else
|
||||
this->setSelection(address, endAddress);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user