summaryrefslogtreecommitdiffstats
path: root/gtk/src/preview.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/src/preview.c')
-rw-r--r--gtk/src/preview.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gtk/src/preview.c b/gtk/src/preview.c
index 7f32d7543..7f688ce62 100644
--- a/gtk/src/preview.c
+++ b/gtk/src/preview.c
@@ -137,8 +137,11 @@ ghb_par_scale(signal_user_data_t *ud, gint *width, gint *height, gint par_n, gin
gint64 num, den;
ghb_screen_par(ud, &disp_par_n, &disp_par_d);
- if (disp_par_n < 1) disp_par_n = 1;
- if (disp_par_d < 1) disp_par_d = 1;
+ if (disp_par_n < 1 || disp_par_d < 1)
+ {
+ disp_par_n = 1;
+ disp_par_d = 1;
+ }
num = par_n * disp_par_d;
den = par_d * disp_par_n;