Jeff Epler wrote: >On Thu, Nov 20, 2008 at 01:14:23AM -0000, Sebastian Kuzminsky wrote: > > >>revision 1.9 >>date: 2008/11/20 01:14:23; author: seb; state: Exp; lines: +2 -0 >>add some missing sanity checks, should fix the crash Roberto found >> >>--- encoder.c 2008/11/19 15:07:33 1.8 >>+++ encoder.c 2008/11/20 01:14:23 1.9 >>@@ -388,6 +388,8 @@ >> void hm2_encoder_process_tram_read(hostmot2_t *hm2, long l_period_ns) { >> int i; >> >>+ if (hm2->encoder.num_instances == 0) return; >>+ >> // read counters & timestamps >> for (i = 0; i < hm2->encoder.num_instances; i ++) { >> hm2_encoder_instance_t *e; >> >I don't see what problem this fixes -- if num_instances is 0 then the >loop doesn't execute, and I don't see anything else in that function >outside the loop. > > The call to hm2_encoder_write is called after the loop.
- Steve ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers