App crash when pressing back-button twice

The App is crashing when pressing the back button (or back in preview mode on PC) twice when there is nothing to go back to. First time nothing happens, second press the App crashes with stacktrace:

[Viewport]: System.NullReferenceException: Object reference not set to an instance of an object.
   at Fuse.Navigation.Router.GoUp() in C:\Users\nicolai\AppData\Local\Fusetools\Packages\Fuse.Navigation\1.7.2\Router.uno:line 278
   at Fuse.Navigation.Router.GoBack() in C:\Users\nicolai\AppData\Local\Fusetools\Packages\Fuse.Navigation\1.7.2\Router.uno:line 263
   at Fuse.Navigation.Router.OnKeyPressed(Object sender, KeyEventArgs args) in C:\Users\nicolai\AppData\Local\Fusetools\Packages\Fuse.Navigation\1.7.2\Router.uno:line 157
   at Fuse.Input.KeyPressed.Invoke(KeyPressedHandler handler, Object sender, KeyPressedArgs args) in C:\Users\nicolai\AppData\Local\Fusetools\Packages\Fuse.Nodes\1.7.2\Input\Keyboard.uno:line 63
   at Fuse.VisualEvent`2.InvokeInternal(THandler handler, Object sender, TArgs args) in C:\Users\nicolai\AppData\Local\Fusetools\Packages\Fuse.Nodes\1.7.2\Event.uno:line 149

This is on Fuse 1.7. In 1.6 the exact same code works without a crash. Code example of minimum App that recreates the crash:

<App>
	<Router ux:Name="router"/>

	<ClientPanel>
		<Navigator DefaultPath="home">
			<Page ux:Template="home">
				<PageControl ux:Name="containerControl">
					<Page>
						<Text Value="Page 1" />
					</Page>
				</PageControl>	
			</Page>
		</Navigator>
	</ClientPanel>
</App>

Hey!

I created issue ticket.

In the meantime, here’s a potential workaround:

<App>
    <Router BackButtonAction="None" ux:Name="router" />

    <JavaScript>
        module.exports = {
            onBackButton: function() {
                router.goBack();
            },
            openPage: function() {
                router.push("page");
            }
        };
    </JavaScript>

    <OnBackButton Handler="{onBackButton}" />

    <ClientPanel>
        <Navigator DefaultPath="home">
            <Page ux:Template="home" Color="#18f">
                <Clicked Handler="{openPage}" />
            </Page>
            <Page ux:Template="page" Color="#f81" />
        </Navigator>
    </ClientPanel>
</App>

This issue is still exist in Fuse 1.7.1

We’ve just merged a fix for this and are putting together a patch release for it, 1.7.2.