From 9b54ac7464ae03ec5245db47a4beff07175087dc Mon Sep 17 00:00:00 2001 From: Ryan Leavengood Date: Fri, 12 Sep 2008 04:13:30 +0000 Subject: [PATCH] Fixing CID 1305: the null check of fPageFormatText on line 483 was redundant since fPageFormatText is accessed in both branches of the if before the null check. If it was actually null there would be a crash well before line 483. In addition this member is initialized in the constructor. I assume the null check was added to provide symmetry with the null check of fJobSetupText below it. But that latter null check is needed since fJobSetupText may not have been created in the constructor. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27427 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/print/ConfigWindow.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/servers/print/ConfigWindow.cpp b/src/servers/print/ConfigWindow.cpp index 428e9efd81..6a9cfa3470 100644 --- a/src/servers/print/ConfigWindow.cpp +++ b/src/servers/print/ConfigWindow.cpp @@ -480,10 +480,9 @@ void ConfigWindow::UpdateUI() fJobSetupText->ResizeToPreferred(); } } - if (fPageFormatText) { - if (fOk->Frame().right < fPageFormatText->Frame().right) - ResizeTo(fPageFormatText->Frame().right + 10, Bounds().bottom); - } + + if (fOk->Frame().right < fPageFormatText->Frame().right) + ResizeTo(fPageFormatText->Frame().right + 10, Bounds().bottom); if (fJobSetupText) { if (fOk->Frame().right < fJobSetupText->Frame().right)