From 62fd968409d0032fb617121ba2a4d00970b8510f Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Thu, 8 Jul 2021 22:34:34 +0400 Subject: [PATCH] Don't call gtk_selection_data_get_length on nullptr --- Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp b/Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp index 8b4eb26c2..49a770c55 100644 --- a/Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp +++ b/Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp @@ -110,7 +110,7 @@ std::vector GetImageFromClipboard() { for (const auto &format : supportedFormats) { if (auto result = GtkSelectionDataPointer( gtk_clipboard_wait_for_contents(clipboard, format)) - ; gtk_selection_data_get_length(result.get()) > 0) { + ; result && gtk_selection_data_get_length(result.get()) > 0) { return result; } }