From 8d0dcd11d7df92044b99ac7c35efaf9202c81512 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Wed, 29 Nov 2023 13:45:53 +1100 Subject: [PATCH] Update StarMainApplication_sdl.cpp --- source/application/StarMainApplication_sdl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/application/StarMainApplication_sdl.cpp b/source/application/StarMainApplication_sdl.cpp index 61a2fa2..48b7fa5 100644 --- a/source/application/StarMainApplication_sdl.cpp +++ b/source/application/StarMainApplication_sdl.cpp @@ -460,9 +460,9 @@ private: Maybe getClipboard() override { Maybe string; if (SDL_HasClipboardText()) { - auto text = SDL_GetClipboardText(); - if (text && *text != NULL) { - string.emplace(text); + if (auto text = SDL_GetClipboardText()) { + if (*text != NULL) + string.emplace(text); SDL_free(text); } }