From: Micah Cowan Date: Fri, 27 Feb 2009 04:17:33 +0000 (-0800) Subject: Don't segfault on "layout number" when not on a layout (thanks Soliton) X-Git-Url: https://repo.or.cz/w/screen-lua.git/commitdiff_plain/01f23034c7abad0e5f3c5cf6dfe51893dc5826e4 Don't segfault on "layout number" when not on a layout (thanks Soliton) --- diff --git a/src/process.c b/src/process.c index 71c69e1..b5474e7 100644 --- a/src/process.c +++ b/src/process.c @@ -4162,6 +4162,11 @@ int key; { int old; struct layout *lay; + if (!D_layout) + { + Msg(0, "not on a layout"); + break; + } if (!args[1]) { Msg(0, "This is layout %d (%s).\n", D_layout->lay_number, D_layout->lay_title);