Fix warning on startup (possible null deref)

This commit is contained in:
danial23 2025-05-20 11:37:42 -04:00
parent 51766eca42
commit bc62310104
Signed by: danial23
SSH key fingerprint: SHA256:IJ8VP0j2WMUVweTYnzUUnEjNgPnGx+mAt+RhqWZ01bU

View file

@ -19,7 +19,9 @@
</button> </button>
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between"> <div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
<ul class="navbar-nav flex-grow-1"> <ul class="navbar-nav flex-grow-1">
@if (User.Identity.IsAuthenticated) @if (User != null
&& User.Identity != null
&& User.Identity.IsAuthenticated)
{ {
if (User.IsInRole("Admin")) if (User.IsInRole("Admin"))
{ {