# Crash-to-desktop Switch bug

**URL:** <https://forums.fusetools.com/t/crash-to-desktop-switch-bug/2129>\
**Category:** Bug Reports\
**Created:** [July 4, 2015, 10:20am UTC](https://forums.fusetools.com/t/crash-to-desktop-switch-bug/2129 "2015-07-04T10:20:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anders\_Jakob\_Sivesin](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_jakob_sivesin/32/548_2.png) [@Anders\_Jakob\_Sivesin](https://forums.fusetools.com/u/Anders_Jakob_Sivesin)\
**Post date:** [July 4, 2015, 10:20am UTC](https://forums.fusetools.com/t/crash-to-desktop-switch-bug/2129/1 "2015-07-04T10:20:10Z")

</div>

ux:

```auto
<App Theme="Basic" ClearColor="#eeeeeeff">
    <DockPanel>
        <StatusBarBackground DockPanel.Dock="Top" />
        <ScrollViewer ClipToBounds="true">
            <StackPanel>
                <Switch ux:Name="switchA" ToggledChanged="example" Toggled="true"/>
                <Switch ux:Name="switchB" ToggledChanged="example"/>
            </StackPanel>
        </ScrollViewer>
    </DockPanel>
</App>

```

Uno:

```auto
using Uno;
using Fuse;
using Fuse.Triggers;
using Fuse.Controls;
using Fuse.Gestures;

public partial class MainView
{
    string enabledT ="switchA";

    void example(object sender, EventArgs args) {
        Switch origin = (Switch) sender;
        Switch enabled = switchA;

        if (origin.Toggled == true) {
            if (enabledT == "switchA") {
                enabled = switchA;
            } else if (enabledT == "switchB") {
                enabled = switchB;
            }

            if (origin.Equals(switchA)) {
                enabled.Toggled = false;
                enabled = switchA;
            } else if (origin.Equals(switchB)) {
                enabled.Toggled = false;
                enabled = switchB;
            }
        } else {
            switchA.Toggled = true;
        }
    }
}

```

If you toggle the bottom switch, Fuse will crash to desktop without any error message.

---

<div class="post-metadata">

**Author:** ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)\
**Post date:** [July 4, 2015, 10:51am UTC](https://forums.fusetools.com/t/crash-to-desktop-switch-bug/2129/2 "2015-07-04T10:51:04Z")

</div>

Thanks for reporting this.
