소스 검색

wayland: Fix return value check from int-to-bool conversion

Frank Praznik 6 달 전
부모
커밋
7ee2ab3830
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/video/wayland/SDL_waylandwindow.c

+ 1 - 1
src/video/wayland/SDL_waylandwindow.c

@@ -2844,7 +2844,7 @@ bool Wayland_SetWindowIcon(SDL_VideoDevice *_this, SDL_Window *window, SDL_Surfa
 
 
     // TODO: Add high-DPI icon support
     // TODO: Add high-DPI icon support
     Wayland_ReleaseSHMBuffer(&wind->icon);
     Wayland_ReleaseSHMBuffer(&wind->icon);
-    if (Wayland_AllocSHMBuffer(icon->w, icon->h, &wind->icon) != 0) {
+    if (!Wayland_AllocSHMBuffer(icon->w, icon->h, &wind->icon)) {
         return SDL_SetError("wayland: failed to allocate SHM buffer for the icon");
         return SDL_SetError("wayland: failed to allocate SHM buffer for the icon");
     }
     }