[haiku-commits] r42474 - haiku/trunk/src/add-ons/media/media-add-ons/multi_audio

  • From: revol@xxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 24 Jul 2011 20:27:05 +0200 (CEST)

Author: mmu_man
Date: 2011-07-24 20:27:05 +0200 (Sun, 24 Jul 2011)
New Revision: 42474
Changeset: https://dev.haiku-os.org/changeset/42474

Modified:
   haiku/trunk/src/add-ons/media/media-add-ons/multi_audio/MultiAudioAddOn.cpp
Log:
No point in checking the new device for NULL if it's not nothrow.


Modified: 
haiku/trunk/src/add-ons/media/media-add-ons/multi_audio/MultiAudioAddOn.cpp
===================================================================
--- haiku/trunk/src/add-ons/media/media-add-ons/multi_audio/MultiAudioAddOn.cpp 
2011-07-24 16:34:41 UTC (rev 42473)
+++ haiku/trunk/src/add-ons/media/media-add-ons/multi_audio/MultiAudioAddOn.cpp 
2011-07-24 18:27:05 UTC (rev 42474)
@@ -197,8 +197,9 @@
                } else {
                        BPath path;
                        entry.GetPath(&path);
-                       MultiAudioDevice *device = new 
MultiAudioDevice(path.Path()
-                               + strlen(rootPath), path.Path());
+                       MultiAudioDevice *device = 
+                               new(std::nothrow) MultiAudioDevice(path.Path()
+                                       + strlen(rootPath), path.Path());
                        if (device) {
                                if (device->InitCheck() == B_OK)
                                        fDevices.AddItem(device);


Other related posts:

  • » [haiku-commits] r42474 - haiku/trunk/src/add-ons/media/media-add-ons/multi_audio - revol