From 1554cdd5d55137e8ae3d1a59465db18d64b75bf6 Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Fri, 27 May 2022 15:18:39 +0100 Subject: [PATCH] Bug fix * Fixed Expression Editor crash on a statement with no arguments --- game/scripts/utility/editor.rpy | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/game/scripts/utility/editor.rpy b/game/scripts/utility/editor.rpy index 709e6700..3be885f4 100644 --- a/game/scripts/utility/editor.rpy +++ b/game/scripts/utility/editor.rpy @@ -305,12 +305,6 @@ init python: else: keywords = ["expression", "face", "xpos", "ypos", "pos", "flip", "trans", "animation", "wand"] - # Args is an ArgumentInfo object, or None, - # the true list of arguments is kept - # within the object itself. - if args: - args = args.arguments - # Arguments are contained within a list, # they consist of opaque tuples, # each one containing a keyword, and a value. @@ -319,6 +313,14 @@ init python: d = _dict() d[who] = _dict() + # Args is an ArgumentInfo object, or None, + # the true list of arguments is kept + # within the object itself. + if not args: + return d + + args = args.arguments + # Resolve arguments for character statements. # (There should be a simpler way to do this, right?) for i, (key, val) in enumerate(args):