From 2e1dddbaa950db18e9d37be31879c969b49370cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Thu, 12 Sep 2019 12:48:39 +0800 Subject: Fix usage --- worker.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/worker.cxx b/worker.cxx index d411456..c47ea2b 100644 --- a/worker.cxx +++ b/worker.cxx @@ -9,8 +9,10 @@ Worker::Worker() void Worker::logIn(QString const& name, QString const& password) { rtclient_login(name.toLatin1().constData(), password.toLatin1().constData()); - auto user = rtclient_userget(name.toLatin1().constData()); - rtclient_userfree(user); + struct rt_user *user = NULL; + rtclient_userget(&user, name.toLatin1().constData()); + if (user) + rtclient_userfree(user); } void Worker::search(QString const& owner) -- cgit v1.2.3