obs-studio/obs
jp9000 18026c363d No need to initialize map value to 0 (bug fix)
There's no need to initialize the map value to 0.  What was happening is
that obs_scene_add was adding a ref to a non-existent value, which
simply created it and added 1, which is perfectly fine.  Then,
obs_add_source would set the ref to 0, overwriting the existing value.

So this meant that if you didn't call them in the right order, it
wouldn't work properly, and would break, which was pretty stupid.

Turns out that if you access a map value that doesn't exist, it'll
create one with the default constructor of that type.  In this case, int
will initialize to 0, which was exactly what we wanted in the first
place, and defeats the purpose of even needing to initialize the value
to 0.  So, there's no need to manually set it to 0 in
OBSBasic::SourceAdded, or worry about the order in which the functions
are called.

Just goes to show you have to be careful with reference counting.
2014-07-16 15:26:14 -07:00
..
forms Add basic update checking 2014-07-14 03:19:24 -07:00
CMakeLists.txt Add license agreement dialog 2014-07-13 11:40:47 -07:00
display-helpers.hpp Ensure sizes passed to OBS are actual pixel sizes 2014-04-16 22:39:05 +02:00
obs-app.cpp Use OBS_CONFIG as the actual version string 2014-07-14 09:51:21 -07:00
obs-app.hpp Add license agreement dialog 2014-07-13 11:40:47 -07:00
platform-osx.mm Add platform specific locale priority enumeration 2014-07-13 19:10:39 +02:00
platform-windows.cpp Add platform specific locale priority enumeration 2014-07-13 19:10:39 +02:00
platform-x11.cpp Add platform specific locale priority enumeration 2014-07-13 19:10:39 +02:00
platform.hpp Add platform specific locale priority enumeration 2014-07-13 19:10:39 +02:00
properties-view.cpp Implement 'path' property in to properties view 2014-06-28 10:12:58 -07:00
properties-view.hpp Implement 'path' property in to properties view 2014-06-28 10:12:58 -07:00
qt-display.hpp Mark method as override 2014-01-25 07:23:57 +01:00
qt-wrappers.cpp Adjust OBSErrorBox severity 2014-07-13 15:23:26 +02:00
qt-wrappers.hpp Use only one widget for preview 2014-03-07 10:19:03 -07:00
volume-control.cpp Fix audio meters so that volume is applied linearly. 2014-07-14 21:12:53 +03:00
volume-control.hpp Implemented a simple volume meter widget 2014-07-14 19:32:39 +03:00
window-basic-main.cpp No need to initialize map value to 0 (bug fix) 2014-07-16 15:26:14 -07:00
window-basic-main.hpp Add basic update checking 2014-07-14 03:19:24 -07:00
window-basic-preview.cpp Fix scene editing for device pixel ratios ≠ 1 2014-07-16 02:29:13 +02:00
window-basic-preview.hpp UI: Add scene editing 2014-06-15 20:33:13 -07:00
window-basic-properties.cpp Add a title to the properties window 2014-07-12 02:08:51 -07:00
window-basic-properties.hpp Fix crash when closing windows via the X title bar button 2014-04-17 17:20:00 +02:00
window-basic-settings.cpp Show current locale in basic settings dialog 2014-07-13 19:10:39 +02:00
window-basic-settings.hpp Use locale (name) enumeration helper in basic settings window 2014-07-13 19:10:39 +02:00
window-basic-source-select.cpp Remove 'locale' parameter from all callbacks 2014-06-25 12:36:26 -07:00
window-basic-source-select.hpp Add 'source selection' dialog 2014-05-10 18:47:48 -07:00
window-basic-status-bar.cpp Change "kbp/s" to "kb/s" 2014-07-07 22:06:06 -07:00
window-basic-status-bar.hpp Implement status bar 2014-07-06 17:36:46 -07:00
window-basic-transform.cpp UI: Change transform value 'scale' to 'size' 2014-06-22 17:37:06 -07:00
window-basic-transform.hpp UI: Add scene editing 2014-06-15 20:33:13 -07:00
window-license-agreement.cpp Add license agreement dialog 2014-07-13 11:40:47 -07:00
window-license-agreement.hpp Add license agreement dialog 2014-07-13 11:40:47 -07:00
window-log-reply.cpp Add help menu with log file uploading 2014-05-18 17:44:10 -07:00
window-log-reply.hpp Add help menu with log file uploading 2014-05-18 17:44:10 -07:00
window-main.hpp Move basic mode configuration to a separate file 2014-03-06 21:08:12 -07:00
window-namedialog.cpp Auto suggest scene and source names. 2014-05-12 15:01:51 -04:00
window-namedialog.hpp Auto suggest scene and source names. 2014-05-12 15:01:51 -04:00