diff options
author | Bastien Nocera <hadess@hadess.net> | 2004-10-14 12:55:46 +0000 |
---|---|---|
committer | Bastien Nocera <hadess@src.gnome.org> | 2004-10-14 12:55:46 +0000 |
commit | 21da14c51b433fc5eddeb5ecffaa18c540fbcef0 (patch) | |
tree | 94838403953a25c2e8527b1350035315762d190e | |
parent | 51829f73a2a5e89a4a22f85bd3d810b9220c735f (diff) | |
download | totem-21da14c51b433fc5eddeb5ecffaa18c540fbcef0.tar.gz |
no warnings when height or width == 0 (Closes: #155376)
2004-10-14 Bastien Nocera <hadess@hadess.net>
* src/video-utils.c: (totem_ratio_fits_screen): no warnings when
height or width == 0 (Closes: #155376)
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/backend/video-utils.c | 4 | ||||
-rw-r--r-- | src/video-utils.c | 4 |
3 files changed, 9 insertions, 4 deletions
@@ -1,5 +1,10 @@ 2004-10-14 Bastien Nocera <hadess@hadess.net> + * src/video-utils.c: (totem_ratio_fits_screen): no warnings when + height or width == 0 (Closes: #155376) + +2004-10-14 Bastien Nocera <hadess@hadess.net> + * src/totem-disc.c: (totem_disc_resolve_link), (get_device): * src/totem-disc.h: remove uses of gint and gchar, follow relative symlinks when checking for the real device name diff --git a/src/backend/video-utils.c b/src/backend/video-utils.c index c73fb2d12..a1792916c 100644 --- a/src/backend/video-utils.c +++ b/src/backend/video-utils.c @@ -402,8 +402,8 @@ totem_ratio_fits_screen (GdkWindow *video_window, int video_width, GdkRectangle fullscreen_rect; int new_w, new_h; - g_return_val_if_fail (video_width > 0, FALSE); - g_return_val_if_fail (video_height > 0, FALSE); + if (video_width <= 0 || video_height <= 0) + return TRUE; new_w = video_width * ratio; new_h = video_height * ratio; diff --git a/src/video-utils.c b/src/video-utils.c index c73fb2d12..a1792916c 100644 --- a/src/video-utils.c +++ b/src/video-utils.c @@ -402,8 +402,8 @@ totem_ratio_fits_screen (GdkWindow *video_window, int video_width, GdkRectangle fullscreen_rect; int new_w, new_h; - g_return_val_if_fail (video_width > 0, FALSE); - g_return_val_if_fail (video_height > 0, FALSE); + if (video_width <= 0 || video_height <= 0) + return TRUE; new_w = video_width * ratio; new_h = video_height * ratio; |