[calligra] krita/ui/input: Don't try to copy an empty event

Dmitry Kazakov dimula73 at gmail.com
Thu Oct 31 06:27:30 UTC 2013


I guess, this bug is *not* in the KisAlternateInvocationAction, but in the
KisShortcutMatcher. It must not emit null events! This 'if' must be changed
to an ASSERT actually.


On Wed, Oct 30, 2013 at 6:40 PM, Boudewijn Rempt <boud at valdyas.org> wrote:

> Git commit 17dee1751eaa38187d1151e2f71ba2cb6ae0e514 by Boudewijn Rempt.
> Committed on 30/10/2013 at 13:24.
> Pushed by rempt into branch 'master'.
>
> Don't try to copy an empty event
>
> BUG:326762
>
> M  +4    -0    krita/ui/input/kis_alternate_invocation_action.cpp
>
> http://commits.kde.org/calligra/17dee1751eaa38187d1151e2f71ba2cb6ae0e514
>
> diff --git a/krita/ui/input/kis_alternate_invocation_action.cpp
> b/krita/ui/input/kis_alternate_invocation_action.cpp
> index bdfe546..002ca42 100644
> --- a/krita/ui/input/kis_alternate_invocation_action.cpp
> +++ b/krita/ui/input/kis_alternate_invocation_action.cpp
> @@ -47,6 +47,8 @@ int KisAlternateInvocationAction::priority() const
>
>  void KisAlternateInvocationAction::begin(int shortcut, QEvent *event)
>  {
> +    if (!event) return;
> +
>      KisAbstractInputAction::begin(shortcut, event);
>
>      QMouseEvent *mouseEvent = dynamic_cast<QMouseEvent*>(event);
> @@ -68,6 +70,8 @@ void KisAlternateInvocationAction::begin(int shortcut,
> QEvent *event)
>
>  void KisAlternateInvocationAction::end(QEvent *event)
>  {
> +    if (!event) return;
> +
>      QMouseEvent *mouseEvent = dynamic_cast<QMouseEvent*>(event);
>
>      QMouseEvent targetEvent(*mouseEvent);
>
>


-- 
Dmitry Kazakov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kimageshop/attachments/20131031/748fc571/attachment.html>


More information about the kimageshop mailing list