[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kopete-devel
Subject:    [kopete-devel] VideoDeviceVector slight refactor suggestion (BUG:
From:       "Alan Jones" <skyphyr () gmail ! com>
Date:       2008-12-29 2:50:42
Message-ID: 5d43fb230812281850m9cdc384o90a16833886aa965 () mail ! gmail ! com
[Download RAW message or body]

Hi All,

I've been looking through http://bugs.kde.org/show_bug.cgi?id=166402

I can't repro this locally because my webcam is built-in, but looking
at the backtrace
I'd guess that the list of webcams is changing, but the current device
remains the
same and then it attempts to access a non-existent index in the
VideoDeviceVector.

Given there's a lot of code around that assumes that the checks were
done earlier
and nothing changes I was thinking perhaps we could instead implement a
VideoDeviceVector class in place of the typedef. This would check the
index is valid,
and if not return a point to a dummy VideoDevice. This dummy device would just
always return a 320x240 Camera Not Available image.

This should help protect from any other instances in which this may
occur as well
as resolving 166402.

Any thoughts?

Cheers,

Alan.
_______________________________________________
kopete-devel mailing list
kopete-devel@kde.org
https://mail.kde.org/mailman/listinfo/kopete-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic