From 8680586dbd0888087767be8e2a80a844aa024a30 Mon Sep 17 00:00:00 2001 From: Rohan Garg Date: Mon, 30 Nov 2015 15:57:22 +0100 Subject: [PATCH] Add a check for waylandServer in the dtor before using it Make sure the waylandServer ptr exists before referencing it in the dtor. REVIEW: 126190 --- main_wayland.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main_wayland.cpp b/main_wayland.cpp index 45a4a66474..d465073257 100644 --- a/main_wayland.cpp +++ b/main_wayland.cpp @@ -75,6 +75,10 @@ ApplicationWayland::ApplicationWayland(int &argc, char **argv) ApplicationWayland::~ApplicationWayland() { + if (!waylandServer()) { + return; + } + waylandServer()->backend()->setOutputsEnabled(false); destroyWorkspace(); waylandServer()->dispatch();