From 9697ac58d06c1995973441929f76cef19ec38f91 Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Tue, 7 Feb 2023 20:40:25 -0500 Subject: [PATCH] Fix crash in case GetLocalIpAddress returns invalid --- CHANGELOG.md | 4 ++++ playlet-lib/src/source/utils/General.bs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f026b457..89810c53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] +### Fixed +- Crash in case GetLocalIpAddress() returns invalid + ## [0.7.0] - 2023-02-04 ### Added - A script to sync between Youtube profile and and Invidious profile diff --git a/playlet-lib/src/source/utils/General.bs b/playlet-lib/src/source/utils/General.bs index 6d26cc02..c1ac62b5 100644 --- a/playlet-lib/src/source/utils/General.bs +++ b/playlet-lib/src/source/utils/General.bs @@ -1,6 +1,6 @@ import "pkg:/source/utils/StringUtils.bs" -function GetLocalIpAddress() as string +function GetLocalIpAddress() as dynamic if m.ipAddress = invalid or m.ipAddress = "" di = CreateObject("roDeviceInfo") ips = di.GetIPAddrs()