From 02ca2d82d6baa44d4e2a41eb877a8569f1935e5a Mon Sep 17 00:00:00 2001 From: Philippe Saint-Pierre Date: Sun, 25 Nov 2012 21:44:09 -0500 Subject: [PATCH] ZombieReplicantView: Dereferrence before NULL check (CID 743868) --- src/kits/interface/ZombieReplicantView.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/kits/interface/ZombieReplicantView.cpp b/src/kits/interface/ZombieReplicantView.cpp index 4e46884156..f9c6dcd2dc 100644 --- a/src/kits/interface/ZombieReplicantView.cpp +++ b/src/kits/interface/ZombieReplicantView.cpp @@ -70,9 +70,10 @@ _BZombieReplicantView_::MessageReceived(BMessage* msg) BAlert* alert = new (std::nothrow) BAlert(B_TRANSLATE("Error"), error.String(), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); - alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); - if (alert != NULL) + if (alert != NULL) { + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); + } break; }