@@ -528,7 +528,9 @@ class LuaObject final : public ObjectBase
528528
529529 // Drawing svg with nanovg + nanosvg borrowed from: https://github.com/VCVRack/Rack/blob/v2/src/window/Svg.cpp
530530 static void drawSVG (NVGcontext* nvg, const char * svgText) {
531- auto * svg = nsvgParse (const_cast <char *>(svgText), " px" , 96 );
531+ std::string svgCopy (svgText);
532+ auto * svg = nsvgParse (svgCopy.data (), " px" , 96 );
533+ if (!svg) return ;
532534
533535 auto getNVGColor = [](uint32_t color) -> NVGcolor {
534536 return nvgRGBA (
@@ -903,7 +905,7 @@ class LuaObject final : public ObjectBase
903905 if (argc >= 3 ) {
904906 auto * path = atom_getsymbol (argv)->s_name ;
905907 auto pathHash = hash (path);
906- if (!images.contains (pathHash || !images.at (pathHash).first .isValid () ))
908+ if (!images.contains (pathHash) || !images.at (pathHash).first .isValid ())
907909 {
908910 auto findFile = [this ](String const & name) {
909911 if (auto patch = cnv->patch .getPointer ()) {
@@ -974,8 +976,6 @@ class LuaObject final : public ObjectBase
974976 // So we have this separate callback function that occurs after activating the GPU context, but before starting the frame
975977 void updateFramebuffers (NVGcontext* nvg) override
976978 {
977- LuaGuiMessage guiMessage;
978-
979979 frameSwapLock.enter ();
980980 auto frames = currentFrame;
981981 currentFrame.clear ();
0 commit comments