Update StarMainApplication_sdl.cpp

This commit is contained in:
Kae 2023-11-29 13:45:53 +11:00
parent 65cf738832
commit 8d0dcd11d7

View File

@ -460,9 +460,9 @@ private:
Maybe<String> getClipboard() override {
Maybe<String> 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);
}
}