From 7770730b14dfc2f53c1aa4a99de24cfc3475e279 Mon Sep 17 00:00:00 2001 From: Tanasart Date: Wed, 17 Jul 2024 09:52:11 +0700 Subject: [PATCH] - [Preview Window] Fix crash when previewing node with no output junction. --- scripts/panel_preview_window/panel_preview_window.gml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/panel_preview_window/panel_preview_window.gml b/scripts/panel_preview_window/panel_preview_window.gml index 2f199de40..9b36bbaa2 100644 --- a/scripts/panel_preview_window/panel_preview_window.gml +++ b/scripts/panel_preview_window/panel_preview_window.gml @@ -65,11 +65,8 @@ function Panel_Preview_Window() : PanelContent() constructor { draw_clear(COLORS.panel_bg_clear); draw_sprite_tiled_ext(s_transparent, 0, 0, 0, 1, 1, COLORS.panel_preview_transparent, 1); - var surf = node_target.outputs[| preview_channel].getValue(); - if(is_array(surf)) - surf = array_spread(surf); - else - surf = [ surf ]; + var surf = node_target.getPreviewValues(); + surf = is_array(surf)? array_spread(surf) : [ surf ]; var dx = 0; var dy = 0;