diff options
author | pommicket <pommicket@gmail.com> | 2025-02-26 11:58:27 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2025-02-26 11:58:27 -0500 |
commit | 700c0f803c933522166f9a91073040f204ca32b6 (patch) | |
tree | ebc7ff53d49bcb9d6d987f1fcbdf556591499ed5 | |
parent | 53453300beac098ac79ca78294515f9fe9743617 (diff) |
minor fixes0.0.0
-rwxr-xr-x | control.sh | 2 | ||||
-rw-r--r-- | main.c | 10 |
2 files changed, 8 insertions, 4 deletions
@@ -14,4 +14,4 @@ Description: Take pictures and videos with a webcam Depends: libsdl2-2.0-0 | libsdl2-dev, libv4l-0 | libv4l-dev, libudev1 | libudev-dev, libsodium23 | libsodium-dev, libfontconfig1 | libfontconfig-dev, libsdl2-ttf-2.0-0 | libsdl2-ttf-dev, libjpeg62-turbo | libjpeg-dev, libavcodec59 | libavcodec61 | libavcodec-dev, libavformat59 | libavformat61 | libavformat-dev Homepage: https://github.com/pommicket/camlet EOF -echo 'Installed-Size: '$(wc -c release/camlet camlet.png camlet.desktop | tail -n1 | cut -d' ' -f1 || exit 1) +echo 'Installed-Size: '$(expr $(wc -c release/camlet camlet.png camlet.desktop | tail -n1 | cut -d' ' -f1 || exit 1) / 1024) @@ -1025,9 +1025,13 @@ int main(int argc, char **argv) { { // set window icon SDL_RWops *ops = SDL_RWFromConstMem(camlet_bmp, camlet_bmp_len); - SDL_Surface *icon = SDL_LoadBMP_RW(ops, true); - SDL_SetWindowIcon(window, icon); - SDL_FreeSurface(icon); + if (ops) { + SDL_Surface *icon = SDL_LoadBMP_RW(ops, true); + if (icon) { + SDL_SetWindowIcon(window, icon); + SDL_FreeSurface(icon); + } + } } state->video = video_init(); |