From 15cca59679e512be9b7652fdf7389ee4ec4c1839 Mon Sep 17 00:00:00 2001 From: arch1t3cht Date: Mon, 2 Jan 2023 15:27:35 +0100 Subject: [PATCH] Validate wxVariant type in hotkey CommandRenderer This fixes a crash on Windows when double-clicking the draggable separator between the column headers "Command" and "Description" in the hotkey configuration dialog. --- src/preferences.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/preferences.cpp b/src/preferences.cpp index f6320dd75..f2ad6b050 100644 --- a/src/preferences.cpp +++ b/src/preferences.cpp @@ -486,8 +486,11 @@ public: } bool SetValue(wxVariant const& var) override { - value << var; - return true; + if (var.GetType() == "wxDataViewIconText") { + value << var; + return true; + } + return false; } bool Render(wxRect rect, wxDC *dc, int state) override {