From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <pve-devel-bounces@lists.proxmox.com> Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 53AEC1FF183 for <inbox@lore.proxmox.com>; Wed, 21 May 2025 14:44:00 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id A183418871; Wed, 21 May 2025 14:44:02 +0200 (CEST) Message-ID: <4fbf0d7c-3c6f-44c1-9889-5bdda44fc417@proxmox.com> Date: Wed, 21 May 2025 14:43:59 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta To: pve-devel@lists.proxmox.com References: <20250520150418.166880-1-s.shaji@proxmox.com> Content-Language: en-US From: Dominik Csapak <d.csapak@proxmox.com> In-Reply-To: <20250520150418.166880-1-s.shaji@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL 0.022 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] applied: [PATCH pve_flutter_frontend] fix: ui: null check operator used on null value error on resource tab X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com> List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe> List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/> List-Post: <mailto:pve-devel@lists.proxmox.com> List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help> List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe> Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com> On 5/20/25 17:04, Shan Shaji wrote: > The issue occurred because the null assertion operator (!) was used on > the `template`` variable, which was potentially null. When the > `PveGuestIcon` widget started rendering, it first checked the if > condition inside the build method. If the `template` variable was > null at that point, Flutter threw an error because the null > assertion operator (!) was used, asserting that the variable > was not null. > > To fix this, the bang operator (!) and the nullable operator (?) > is removed. Additionally, in the `PveGuestListTile`, a default > value of `false` is assigned when the `template` value is null. > > Summary of the changes: > - Removed the bang operator (!) from the `template` variable > in `PveGuestIcon`. > - Removed the nullable operator (?). > - Assigned a default value of false to `template` in `PveGuestListTile` > when it's null. > > Signed-off-by: Shan Shaji <s.shaji@proxmox.com> > --- > lib/pages/main_layout_slim.dart | 2 +- > lib/widgets/pve_guest_icon_widget.dart | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) > > applied, thanks! I fixed up the commit message with a small explanation how one could run into this _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel