From 39aa9ae1999247f0dde148faaef50f268a734e4c Mon Sep 17 00:00:00 2001 From: Ryan Leavengood Date: Wed, 29 Dec 2010 04:15:14 +0000 Subject: [PATCH] CID 2393: Check the return value of GetDecoratorSettings (though this is probably not needed.) Another problem fixed here is that the border width value is in "border width" not "border" so this code wasn't really working before. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40007 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/showimage/ProgressWindow.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/apps/showimage/ProgressWindow.cpp b/src/apps/showimage/ProgressWindow.cpp index 569f3adc26..09daa9a924 100644 --- a/src/apps/showimage/ProgressWindow.cpp +++ b/src/apps/showimage/ProgressWindow.cpp @@ -69,11 +69,11 @@ ProgressWindow::Start(BWindow* referenceWindow, bool center) BScreen screen(referenceWindow); if (!center) { BMessage settings; - GetDecoratorSettings(&settings); - - int32 borderWidth; - if (settings.FindInt32("border", &borderWidth) != B_OK) - borderWidth = 5; + int32 borderWidth = 5; + if (GetDecoratorSettings(&settings) == B_OK) { + if (settings.FindInt32("border width", &borderWidth) != B_OK) + borderWidth = 5; + } MoveTo(screen.Frame().left + borderWidth, screen.Frame().bottom - Bounds().Height() - borderWidth);