Author: post
Date: 2010-03-30 22:58:48 +0200 (Tue, 30 Mar 2010)
New Revision: 3281

Modified:
   trunk/plugins/resample/resample.c
Log:
Add additional check and debug print to resampler, since crashes seem to 
happend here.

Modified: trunk/plugins/resample/resample.c
===================================================================
--- trunk/plugins/resample/resample.c   2010-03-30 20:56:30 UTC (rev 3280)
+++ trunk/plugins/resample/resample.c   2010-03-30 20:58:48 UTC (rev 3281)
@@ -261,8 +261,18 @@
 {
        ResampleInfo* t = _thread_info;
 
-       if (t->input->w == t->output->w)
+       if (!t->input))
        {
+               g_debug("Resampler: input is NULL");
+               return;
+       }
+       if (!t->output))
+       {
+               g_debug("Resampler: output is NULL");
+               return;
+       }
+       if (t->input->h != t->output->h)
+       {
                gboolean sse2_available = !!(rs_detect_cpu_features() & 
RS_CPU_FLAG_SSE2);
                if (t->use_fast)
                        ResizeV_fast(t);
@@ -272,7 +282,7 @@
                        ResizeV_SSE2(t);
                else
                        ResizeV(t);
-       } else  {
+       } else if (t->input->w != t->output->w) {
                if (t->use_fast)
                        ResizeH_fast(t);
                else if (t->use_compatible)


_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit

Reply via email to