From f078a0e4db0e5c378b794881447d0baa9e6a9e06 Mon Sep 17 00:00:00 2001 From: Kazumasa Mitsunari Date: Fri, 28 Sep 2018 19:22:37 +0900 Subject: Fix nullptr access Change-Id: I6e22acefdf885efc4c2517265ff38cbac07cef48 Signed-off-by: Kazumasa Mitsunari --- src/qlibwindowmanager.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qlibwindowmanager.cpp b/src/qlibwindowmanager.cpp index bb9d6ce..38c6063 100644 --- a/src/qlibwindowmanager.cpp +++ b/src/qlibwindowmanager.cpp @@ -26,13 +26,15 @@ int QLibWindowmanager::init(int port, const QString &token) { string ctoken = token.toStdString(); int ret_init = this->wm->init(port, ctoken); - if(ret_init == 0) { + this->screen_info = new AGLScreenInfoPrivate; + + // if(ret_init == 0) { struct Screen scrn = this->wm->getScreenInfo(); this->screen_info->set_width_dp(scrn.width_dp); this->screen_info->set_height_dp(scrn.height_dp); this->screen_info->set_height_mm(scrn.width_mm); this->screen_info->set_scale_factor(scrn.width_mm); - } + // } return ret_init; } -- cgit 1.2.3-korg