diff --git a/CMakeLists.txt b/CMakeLists.txt index 6b1dfd2..9aa7bdb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.20) set(NAME "LamasTinyHUD") -set(VERSION 1.2.1.0) +set(VERSION 1.2.2.0) # ---- Options ---- diff --git a/src/ui/ui_renderer.cpp b/src/ui/ui_renderer.cpp index 86b9d35..2bce167 100644 --- a/src/ui/ui_renderer.cpp +++ b/src/ui/ui_renderer.cpp @@ -223,7 +223,12 @@ namespace ui { //it should center the text, it kind of does auto text_x = 0.f; auto text_y = 0.f; - const ImVec2 text_size = ImGui::CalcTextSize(a_text, nullptr, true); + + if (!a_text || !*a_text) { + return; + } + + const ImVec2 text_size = ImGui::CalcTextSize(a_text); if (a_center_text) { text_x = -text_size.x * 0.5f; text_y = -text_size.y * 0.5f; diff --git a/vcpkg.json b/vcpkg.json index 44b230a..0360f45 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,6 +1,6 @@ { "name": "lamastinyhud", - "version-string": "1.2.1", + "version-string": "1.2.2", "description": "hud element for skyrim", "homepage": "https://github.com/mlthelama/LamasTinyHUD", "license": "GPL-2.0-or-later",