summaryrefslogtreecommitdiff
path: root/src/atcmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/atcmd.c')
-rw-r--r--src/atcmd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/atcmd.c b/src/atcmd.c
index e153d39..95d86dc 100644
--- a/src/atcmd.c
+++ b/src/atcmd.c
@@ -1139,6 +1139,11 @@ int sms_device_open(void)
int fd = -1;
int tmp;
+ if (!Global.core.device) {
+ log_error("device is not set");
+ return -1;
+ }
+
lock_path = device_lock(Global.core.device);
if (!lock_path) {
sms_device_close(fd);