Rgb matrix editor -- fix crashes

Fix crashes when changing a script parameters during a test run.
The crashes are thread-related (engine thread and ui thread running scripts at the same time)