Update visual_tool.cpp

Fix mouse-capture crash