From 05861583893c60e7fa38d4abb161e523aac883cb Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Tue, 2 Apr 2024 13:20:20 +0200 Subject: [PATCH] st/clipboard: Pass non-NULL mimetype to SelectionSourceMemory meta_selection_source_memory_new previously had some precondition checks which would return NULL if the mimetype is NULL but now that it returns an error we can't do that anymore. Move the precondition checks to the caller instead. Part-of: --- src/st/st-clipboard.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/st/st-clipboard.c b/src/st/st-clipboard.c index 6df278b2e..4867b1306 100644 --- a/src/st/st-clipboard.c +++ b/src/st/st-clipboard.c @@ -302,6 +302,7 @@ st_clipboard_set_content (StClipboard *clipboard, g_return_if_fail (ST_IS_CLIPBOARD (clipboard)); g_return_if_fail (meta_selection != NULL); g_return_if_fail (bytes != NULL); + g_return_if_fail (mimetype != NULL); if (!convert_type (type, &selection_type)) return;