From: Michael Stapelberg Date: Tue, 18 Oct 2011 17:47:07 +0000 (+0100) Subject: Bugfix: Fix segfault when starting i3 (Thanks pnutzh4x0r) X-Git-Tag: 4.1~94 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a506e59b3c53c3d6989d2bcd65a05e43481de293;p=i3%2Fi3 Bugfix: Fix segfault when starting i3 (Thanks pnutzh4x0r) --- diff --git a/src/workspace.c b/src/workspace.c index e06dbde5..2aad2a10 100644 --- a/src/workspace.c +++ b/src/workspace.c @@ -207,7 +207,8 @@ static void _workspace_show(Con *workspace, bool changed_num_workspaces) { * the corresponding workspace is cleaned up. */ FREE(previous_workspace_name); - previous_workspace_name = sstrdup(current->name); + if (current) + previous_workspace_name = sstrdup(current->name); workspace_reassign_sticky(workspace);