Closed Bug 1248799 Opened 8 years ago Closed 8 years ago

[coverity] Potential null pointer dereference in ToolbarDisplayLayout

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1236431

People

(Reporter: mcomella, Assigned: mcomella)

References

Details

Attachments

(1 file)

via Coverity:

*** CID 123355:  Null pointer dereferences  (FORWARD_NULL)
/mobile/android/base/java/org/mozilla/gecko/toolbar/ToolbarDisplayLayout.java: 363 in org.mozilla.gecko.toolbar.ToolbarDisplayLayout.updateProgress(org.mozilla.gecko.Tab)()
357         private void updateProgress(Tab tab) {
358             final boolean shouldShowThrobber = (tab != null &&
359                                                 tab.getState() == Tab.STATE_LOADING);
360
361             updateUiMode(shouldShowThrobber ? UIMode.PROGRESS : UIMode.DISPLAY);
362
>>>     CID 123355:  Null pointer dereferences  (FORWARD_NULL)
>>>     Calling a method on null object "tab".
363             if (Tab.STATE_SUCCESS == tab.getState() && mTrackingProtectionEnabled) {
364                 mActivity.showTrackingProtectionPromptIfApplicable();
365             }
366         }
367
368         private void updateUiMode(UIMode uiMode) {
I already fixed this as part of the "pre" patch in bug 1236431. :)
Comment on attachment 8720033 [details]
MozReview Request: Bug 1248799 - Don't call method on potentially null tab Object. r=sebastian

(In reply to Sebastian Kaspari (:sebastian) from comment #2)
> I already fixed this as part of the "pre" patch in bug 1236431. :)

http://hg.mozilla.org/integration/fx-team/rev/7945d91d718d
Attachment #8720033 - Flags: review?(s.kaspari)
Also see bug 1248908: This tool wants to remove the null checks again. And it seems like it's right.
See Also: → 1248908
(comment 2)
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: