diff --git a/aegisub/src/toolbar.cpp b/aegisub/src/toolbar.cpp index 41cb50adf..db16f7b97 100644 --- a/aegisub/src/toolbar.cpp +++ b/aegisub/src/toolbar.cpp @@ -75,7 +75,7 @@ namespace { if (commands[i]->Type() & cmd::COMMAND_VALIDATE) { EnableTool(TOOL_ID_BASE + i, commands[i]->Validate(context)); } - if (commands[i]->Type() & cmd::COMMAND_TOGGLE) { + if (commands[i]->Type() & cmd::COMMAND_TOGGLE || commands[i]->Type() & cmd::COMMAND_RADIO) { ToggleTool(TOOL_ID_BASE + i, commands[i]->IsActive(context)); } } diff --git a/aegisub/src/video_display.cpp b/aegisub/src/video_display.cpp index 0a2dfb0dd..113a59352 100644 --- a/aegisub/src/video_display.cpp +++ b/aegisub/src/video_display.cpp @@ -433,7 +433,7 @@ void VideoDisplay::SetTool(VisualToolBase *new_tool) { } bool VideoDisplay::ToolIsType(std::type_info const& type) const { - return typeid(*tool) == type; + return tool && typeid(*tool) == type; } Vector2D VideoDisplay::GetMousePosition() const {