
22 Cal.Rptr.3d 757 (2004)
125 Cal.App.4th 415
The PEOPLE, Plaintiff and Respondent,
v.
Tracy Lynn BEAGLE, Defendant and Appellant.
No. F044486.
Court of Appeal, Fifth District.
December 28, 2004.
*758 Jill D. Lansing, Los Angeles, under appointment by the Court of Appeal, for Defendant and Appellant.
*759 Bill Lockyer, Attorney General, Robert R. Anderson, Chief Assistant Attorney General, Mary Jo Graves, Assistant Attorney General, Lloyd G. Carter and Kathleen A. McKenna, Deputy Attorneys General, for Plaintiff and Respondent.

OPINION
WISEMAN, Acting P.J.
In an all-too-common scenario, defendant Tracy Beagle was arrested during a search resulting in the seizure of drugs in one location and weapons, in this case nunchakus, found in another. Defendant entered a guilty plea to the weapon charge in exchange for dismissal of the drug charge and imposition of probation. At sentencing, the court imposed weapon-and drug-related probation conditions. We conclude that the rule of People v. Harvey (1979) 25 Cal.3d 754, 159 Cal.Rptr. 696, 602 P.2d 396 (which prohibits the negative consideration at sentencing of dismissed charges) applies to probation conditions. We remand to enable the trial court to exercise its discretion in determining whether to reimpose the drug-related conditions of probation based on facts other than those related to the dismissed drug charge, such as defendant's background.

FACTUAL AND PROCEDURAL HISTORIES
We derive the facts from the transcript of the preliminary hearing. Officers searched defendant's house. In a bag sitting atop a plastic plant, they found methamphetamine, a scale, a pipe, a spoon, and some baggies. In another location in the house (a closet) the officers found a pair of wooden nunchakus, a prohibited weapon.
The district attorney filed an information charging defendant with possessing methamphetamine for sale (Health & Saf.Code, § 11378) and possessing nunchakus (Pen.Code, § 12020, subd. (a)).
The parties entered into a plea bargain. Defendant agreed to plead guilty to the weapon charge in exchange for dismissal of the drug charge and imposition of probation, including a jail term of no more than one year. The court accepted the plea on these terms.
The court imposed probation subject to conditions, including jail time equal to defendant's accumulated credits, a search condition not limited to any specific subject matter, an obedience-of-the-law condition, and a prohibition on possession of any weapons. The court also imposed the following drug-related conditions:
"[Defendant] shall absolutely refrain from the use and possession of and not have under his control any narcotic, restricted dangerous drug, marijuana or hallucinogenic drug, and not associate or be with any person known by him to be engaged in the illegal use, possession or control of such substances, nor be in, around or about any place known to him to be one where any such substance is illegally sold, supplied, store[d] or is present.
"He shall submit to a drug use detection test as directed by any probation officer or any peace officer.
"He shall successfully complete an out-patient substance abuse counseling program approved in advance by his probation officer, and obey all rules of that program."

DISCUSSION
The issue regarding People v. Harvey, supra, 25 Cal.3d 754, 159 Cal.Rptr. 696, 602 P.2d 396, was brought to our attention by the People. Before discussing it, we first dispose of the weaker argument advanced in defendant's briefs.
*760 Defendant argues that the search condition and the drug conditions are not reasonably related to the weapon possession crime of which he was convicted.[1] He does not challenge the weapons condition.
Defendant's argument is easily rebutted under well-settled principles. Our Supreme Court explained them in People v. Lent (1975) 15 Cal.3d 481, 486, 124 Cal.Rptr. 905, 541 P.2d 545:
"The Legislature has placed in trial judges a broad discretion in ... the determination as to whether probation is appropriate and, if so, the conditions thereof. (Pen.Code § 1203 et seq.) A condition of probation will not be held invalid unless it `(1) has no relationship to the crime of which the offender was convicted, (2) relates to conduct which is not in itself criminal, and (3) requires or forbids conduct which is not reasonably related to future criminality....' [Citation.]"
The conditions defendant challenges each satisfy one of these conditions. The search condition is obviously related to the possession of contraband, of which defendant was convicted. The drug conditions  even those prohibiting conduct not criminal in itself  obviously relate to future criminality, namely, future use of illegal drugs. Apart from the Harvey issue, it is clear that the court did not abuse its discretion. Its decision did not "`"[exceed] the bounds of reason, all of the circumstances being considered."'" (People v. Welch (1993) 5 Cal.4th 228, 234, 19 Cal.Rptr.2d 520, 851 P.2d 802.)
We commend the deputy attorney general who signed the People's brief for honoring her obligation to cite controlling authority not mentioned by defendant. As the People point out, in People v. Harvey, supra, 25 Cal.3d 754, 758, 159 Cal.Rptr. 696, 602 P.2d 396, our Supreme Court stated as follows:
"Count three was dismissed in consideration of defendant's agreement to plead guilty to counts one and two. Implicit in such a plea bargain, we think, is the understanding (in the absence of any contrary agreement) that defendant will suffer no adverse consequences by reason of the facts underlying, and solely pertaining to, the dismissed count."
This holding raises the question of whether the trial court in this case violated an implicit term of the plea agreement by including drug conditions among the conditions of probation, even though the only drug charge was dismissed as part of the agreement.
We are met at the threshold by two issues of waiver. First, was possible Harvey error sufficiently raised in the trial court to preserve it for appeal? We conclude that it was. Defendant filed a sentencing statement before the sentencing hearing. In it, he objected to the recommendation in the probation report of an unlimited search condition. He contended that "[t]here was no `Harvey' waiver" to justify a condition based on the facts underlying the dismissed drug charge, so the search condition should be limited to weapons and should exclude drugs. He also argued that the drug conditions were unrelated to the offense of conviction. Defendant had previously made the same points at the change-of-plea hearing. We conclude that defendant's comments in the trial court sufficiently brought the issue to *761 the court's attention and gave the People an opportunity to respond. Further, although it has been held that an objection to a condition of probation must be made "at the sentencing hearing," (People v. Welch, supra, 5 Cal.4th 228, 234-235, 19 Cal.Rptr.2d 520, 851 P.2d 802) that requirement is satisfied where, as here, defendant objected to a condition in a sentencing statement, and the court stated at the hearing that it had read the statement and was imposing the condition anyway.
The second waiver question is whether the Harvey issue has been sufficiently placed before us even though defendant has not raised it. We believe it has been. Nothing prevents us from considering a possible error not raised in a criminal defendant's briefs (see People v. Wende (1979) 25 Cal.3d 436, 158 Cal.Rptr. 839, 600 P.2d 1071), and we certainly are not barred from reviewing such an issue when the People bring it to our attention.
Turning to the merits of the Harvey issue, we first must determine whether Harvey applies to conditions of probation. In Harvey, the defendant pleaded guilty to two counts of robbery in exchange for the dismissal of a third count for another, unrelated robbery. The trial court imposed the upper term for one of the robbery counts, expressly relying on a discussion in the probation report of the circumstances of the dismissed count. (People v. Harvey, supra, 25 Cal.3d at pp. 757-758, 159 Cal.Rptr. 696, 602 P.2d 396.) As noted above, the court held that this was improper. (Id. at p. 758, 159 Cal.Rptr. 696, 602 P.2d 396.)
We see no basis for distinguishing conditions of probation from prison sentences in this context. The Supreme Court held that a plea bargain involving the dismissal of a count contains an implied term that the defendant will suffer "no adverse sentencing consequences" based on the facts underlying the dismissed count. (People v. Harvey, supra, 25 Cal.3d at p. 758, 159 Cal.Rptr. 696, 602 P.2d 396.) The court did not say that this rule was limited only to increased prison terms. A condition of probation adding a restriction on the defendant's conduct is an "adverse sentencing consequence." We have found no case stating that it is not.
The second issue on the merits is whether the weapon charge was "transactionally related" to the drug charge. The Harvey court recognized an exception permitting consideration of dismissed charges that have this relationship with the admitted offense. (People v. Harvey, supra, 25 Cal.3d at p. 758, 159 Cal.Rptr. 696, 602 P.2d 396.) The People argue that this case is within the exception. We disagree. Cases interpreting the exception have identified facts from which it could at least be inferred that some action of the defendant giving rise to the dismissed count was also involved in the admitted count.
In People v. Gaskill (1980) 110 Cal.App.3d 1, 167 Cal.Rptr. 549, the defendant pleaded guilty to possession of an illegal gun in exchange for dismissal of an assault with a deadly weapon charge. The trial court imposed the upper term on the weapon charge, based in part on the assault. (Id. at p. 3, 167 Cal.Rptr. 549.) The appellate court held that there was no Harvey error because the assault consisted of brandishing the illegal gun, and therefore the possession and assault charges were parts of the same transaction. (Id. at p. 4, 167 Cal.Rptr. 549.) The present case is not similar. There is no evidence in the record of any transaction to which defendant's nunchakus and the drugs were both connected.
The facts of People v. Bradford (1995) 38 Cal.App.4th 1733, 45 Cal.Rptr.2d 757 are somewhat closer to those of the present *762 case. There, the defendant pleaded guilty to cultivation of marijuana in exchange for dismissal of a gun possession charge. Illegal shotguns were found in a cabin on property where the marijuana was growing. The trial court imposed the upper sentence after considering the defendant's weapons possession as an aggravating factor. (Id. at pp. 1736-1737, 45 Cal.Rptr.2d 757.) The Court of Appeal held that there was no Harvey error because the cultivation was a continuing crime and the guns were found loaded in a cabin in a compound "dedicated to" the cultivation. (Id. at p. 1739.) The court concluded that the defendant was armed with the illegal weapons during the cultivation offense. It found support in People v. Bland (1995) 10 Cal.4th 991, 995, 43 Cal.Rptr.2d 77, 898 P.2d 391, in which the Supreme Court held that an arming enhancement under Penal Code section 12022 can be established if (among other criteria) "`at some point during the period of illegal drug possession, the defendant had the firearm close at hand and thus available for immediate use to aid in the drug offense.'" (People v. Bradford, supra, 38 Cal.App.4th at pp. 1738-1739, 45 Cal.Rptr.2d 757.)
The present case is also unlike Bradford. The inference that loaded shotguns found on a marijuana farm were being used to secure the farm may be reasonable. However, an inference that a pair of nunchakus found in a closet assisted in the possession of methamphetamine found elsewhere, on the sole ground that both were present in the same house at the same time, is not.
A better comparison is with People v. Berry (1981) 117 Cal.App.3d 184, 172 Cal.Rptr. 756. There, the defendant was apprehended in a stolen car with a pistol under the seat. (Id. at pp. 196-197, 172 Cal.Rptr. 756.) He was charged with unlawfully taking a vehicle, carrying a concealed weapon, and carrying a loaded firearm. He pleaded guilty to the vehicle charge in return for the dismissal of the weapon charges. (Id. at p. 194, 172 Cal.Rptr. 756.) The trial court imposed the upper term on the vehicle count, partly on the basis of the gun possession. (Id. at p. 193, 172 Cal.Rptr. 756.) This court vacated the sentence and remanded, holding that there was no transactional relationship between the admitted and dismissed counts and that the trial court committed Harvey error:
"The question of whether the possession of the gun was transactionally related to the driving of the vehicle is a close one.... In each of [several cited cases where there was no Harvey error] it may be seen that there was a close relationship between the offense to which there was a plea of guilty and the dismissed offense. [¶] In the instant case, no such relationship appears. There is nothing to show that the defendant used the pistol to obtain or retain possession of the vehicle. He did not drive the vehicle while brandishing the weapon. The vehicle merely served as a container for it. Such a tenuous connection between the dismissed counts and the vehicle theft does not rise to the status of being `transactionally related.'" (People v. Berry, supra, 117 Cal.App.3d at p. 197, 172 Cal.Rptr. 756.)
The connection here between the nunchakus in the closet and the drugs in the bag on top of the plant is equally tenuous, if not more so, as far as the record discloses.
The People argue that the two offenses were transactionally related because the weapon and drugs were found during the same search. This cannot be correct. The search is not a transaction in the relevant sense  i.e., it is not connected with the offenses.
*763 We conclude that the weapon charge to which defendant admitted was not transactionally related to the dismissed drug charge. The exception to Harvey for such relationships does not apply.
Finally, we consider whether the court imposed the drug conditions "by reason of" the facts underlying the dismissed count (People v. Harvey, supra, 25 Cal.3d at p. 758, 159 Cal.Rptr. 696, 602 P.2d 396), as opposed to some other facts. The record is obscure on this point. At the sentencing hearing, the trial court announced that it had reviewed the probation report, but did not say which of the report's findings, if any, it was relying on. The report recited the facts on which the drug possession charge was based, but also included other drug-related facts: Defendant, who was 32, used marijuana, alcohol and methamphetamine between the ages of 17 and 19 and continued to drink beer occasionally; he did not consider himself a drug addict, but was currently taking substance abuse classes; and he had a prior conviction for public intoxication (Pen.Code, § 647, subd. (f)). We are unable to determine from the record whether the court imposed the drug conditions on the basis of the facts underlying the drug charge alone (i.e., the drugs and paraphernalia seized at defendant's house), or whether it would have imposed the drug conditions even if it had disregarded those facts. For this reason, we must remand.
In summary, we hold that the court properly imposed the weapon and search conditions on its grant of probation, but that Harvey prohibited it from imposing the drug-related conditions if they were based on facts on which the drug charge was based. We will remand to allow the court to exercise its discretion on the question of whether the other drug-related facts warranted the drug conditions.

DISPOSITION
The drug-related conditions of probation are vacated. The judgment is affirmed in all other respects. The case is remanded to the trial court for a determination of whether to reimpose the drug-related conditions of probation on the basis of facts other than those that formed the basis of the drug possession charge.
WE CONCUR: LEVY and GOMES, JJ.
NOTES
[1]  In the sentencing statement defendant filed in the trial court, he argued that the scope of the search condition should be limited to weapons. On appeal, however, he simply contends that the search condition should be stricken and does not ask us to consider narrowing its scope.
